Package org.gephi.data.attributes.type

Examples of org.gephi.data.attributes.type.BooleanList


     * Used to negate all values of a list of boolean values column.
     */
    private void negateColumnListBooleanType(AttributeTable table, AttributeColumn column) {
        final int columnIndex = column.getIndex();
        Object value;
        BooleanList list;
        Boolean[] newValues;
        for (Attributes row : getTableAttributeRows(table)) {
            value = row.getValue(columnIndex);
            if (value != null) {
                list = (BooleanList) value;
                newValues = new Boolean[list.size()];
                for (int i = 0; i < list.size(); i++) {
                    newValues[i] = !list.getItem(i);
                }
                row.setValue(columnIndex, new BooleanList(newValues));
            }
        }
    }
View Full Code Here


            return new DoubleList((double[]) array);
        else if (componentType == Double.class)
            return new DoubleList((Double[]) array);

        else if (componentType == boolean.class)
            return new BooleanList((boolean[]) array);
        else if (componentType == Boolean.class)
            return new BooleanList((Boolean[]) array);

        else if (componentType == char.class)
            return new CharacterList((char[]) array);
        else if (componentType == Character.class)
            return new CharacterList((Character[]) array);
View Full Code Here

     * Used to negate all values of a list of boolean values column.
     */
    private void negateColumnListBooleanType(AttributeTable table, AttributeColumn column) {
        final int columnIndex = column.getIndex();
        Object value;
        BooleanList list;
        Boolean[] newValues;
        for (Attributes row : getTableAttributeRows(table)) {
            value = row.getValue(columnIndex);
            if (value != null) {
                list = (BooleanList) value;
                newValues = new Boolean[list.size()];
                for (int i = 0; i < list.size(); i++) {
                    newValues[i] = !list.getItem(i);
                }
                row.setValue(columnIndex, new BooleanList(newValues));
            }
        }
    }
View Full Code Here

            return new DoubleList((double[]) array);
        else if (componentType == Double.class)
            return new DoubleList((Double[]) array);

        else if (componentType == boolean.class)
            return new BooleanList((boolean[]) array);
        else if (componentType == Boolean.class)
            return new BooleanList((Boolean[]) array);

        else if (componentType == char.class)
            return new CharacterList((char[]) array);
        else if (componentType == Character.class)
            return new CharacterList((Character[]) array);
View Full Code Here

TOP

Related Classes of org.gephi.data.attributes.type.BooleanList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.