Examples of countValues()


Examples of javax.microedition.pim.Contact.countValues()

        for (int i = 0; i < _invitees.size(); ++i) {
            try {
                final Contact c = (Contact) _invitees.elementAt(i);
                final String name = PIMDemo.getDisplayName(c);

                if (c.countValues(Contact.EMAIL) > 0) {
                    to[i] = new Address(c.getString(Contact.EMAIL, 0), name);
                }
            } catch (final AddressException e) {
                PIMDemo.errorDialog("Address(String, String) threw "
                        + e.toString());
View Full Code Here

Examples of javax.microedition.pim.Contact.countValues()

            } else if (bodyPart instanceof PDAPContactAttachmentPart) {
                final Contact contact = (Contact) bodyPart.getContent();

                // Build the contact name
                final StringBuffer sb = new StringBuffer("Contact: ");
                if (contact.countValues(Contact.NAME) > 0) {
                    final String[] name =
                            contact.getStringArray(Contact.NAME, 0);

                    if (name[Contact.NAME_PREFIX] != null) {
                        sb.append(name[Contact.NAME_PREFIX]);
View Full Code Here

Examples of javax.microedition.pim.Contact.countValues()

                    // Search for a valid address
                    while (enumContact.hasMoreElements() && !foundAddress) {
                        c = (Contact) enumContact.nextElement();

                        if (c.countValues(Contact.ADDR) > 0) {
                            final String address[] =
                                    c.getStringArray(Contact.ADDR, 0);

                            if (address[Contact.ADDR_LOCALITY] != null
                                    && address[Contact.ADDR_REGION] != null) {
View Full Code Here

Examples of org.gephi.attribute.api.Index.countValues()

        if (AttributeUtils.isNodeColumn(column)) {
            index = localScale ? graphModel.getNodeIndex(graphModel.getVisibleView()) : graphModel.getNodeIndex();
        } else {
            index = localScale ? graphModel.getEdgeIndex(graphModel.getVisibleView()) : graphModel.getEdgeIndex();
        }
        int valueCount = index.countValues(column);
        int elementCount = index.countElements(column);
        double ratio = valueCount / (double) elementCount;
        if (column.isNumber()) {
            Class columnTypeClass = column.getTypeClass();
            if (columnTypeClass.equals(Integer.class)) {
View Full Code Here

Examples of org.gephi.attribute.api.Index.countValues()

            if (AttributeUtils.isNodeColumn(column)) {
                index = localScale ? graphModel.getNodeIndex(graphModel.getVisibleView()) : graphModel.getNodeIndex();
            } else {
                index = localScale ? graphModel.getEdgeIndex(graphModel.getVisibleView()) : graphModel.getEdgeIndex();
            }
            if (index.countValues(column) > 0 && !isPartition(column)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeRow.countValues()

        for (; rowIndex < nodes.length; rowIndex++) {
            if (!gec.isNodeInGraph(nodes[rowIndex])) {
                continue;//Make sure node is still in graph when continuing a search
            }
            row = (AttributeRow) nodes[rowIndex].getNodeData().getAttributes();
            for (; columnIndex < row.countValues(); columnIndex++) {
                if (searchAllColumns || columnsToSearch.contains(columnIndex)) {
                    value = row.getValue(columnIndex);
                    result = matchRegex(value, searchOptions, rowIndex, columnIndex);
                    if (result != null) {
                        result.setFoundNode(nodes[rowIndex]);
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeRow.countValues()

        for (; rowIndex < edges.length; rowIndex++) {
            if (!gec.isEdgeInGraph(edges[rowIndex])) {
                continue;//Make sure edge is still in graph when continuing a search
            }
            row = (AttributeRow) edges[rowIndex].getEdgeData().getAttributes();
            for (; columnIndex < row.countValues(); columnIndex++) {
                if (searchAllColumns || columnsToSearch.contains(columnIndex)) {
                    value = row.getValue(columnIndex);
                    result = matchRegex(value, searchOptions, rowIndex, columnIndex);
                    if (result != null) {
                        result.setFoundEdge(edges[rowIndex]);
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeRow.countValues()

    @Override
    protected void flushToNodeAttributes(NodeDraftGetter nodeDraft, Node node) {
        if (node.getNodeData().getAttributes() != null) {
            AttributeRow row = (AttributeRow) node.getNodeData().getAttributes();
            for (int i = 0; i < row.countValues(); i++) {
                Object val = row.getValue(i);
                AttributeColumn col = row.getColumnAt(i);
                Object draftValue = nodeDraft.getAttributeRow().getValue(col.getId());
                if (col.getType().isDynamicType()) {
                    if (draftValue == null && val != null) {
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeRow.countValues()

    @Override
    protected void flushToEdgeAttributes(EdgeDraftGetter edgeDraft, Edge edge) {
        if (edge.getEdgeData().getAttributes() != null) {
            AttributeRow row = (AttributeRow) edge.getEdgeData().getAttributes();
            for (int i = 0; i < row.countValues(); i++) {
                Object val = row.getValue(i);
                AttributeColumn col = row.getColumnAt(i);
                Object draftValue = edgeDraft.getAttributeRow().getValue(col);
                if (col.getId().equals(PropertiesColumn.EDGE_WEIGHT.getId())) {
                    draftValue = new Float(edgeDraft.getWeight());
View Full Code Here

Examples of org.gephi.data.attributes.api.AttributeRow.countValues()

        copyData.setColor(nodeData.r(), nodeData.g(), nodeData.b());
        copyData.setAlpha(nodeData.alpha());

        //Copy attributes:
        AttributeRow row = (AttributeRow) nodeData.getAttributes();
        for (int i = 0; i < row.countValues(); i++) {
            if (row.getValues()[i].getColumn().getOrigin() == AttributeOrigin.DATA) {
                copyData.getAttributes().setValue(i, row.getValue(i));
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.