Search in sources :

Example 6 with Property

use of org.vertexium.Property in project vertexium by visallo.

the class PropertyCollection method getProperty.

public synchronized Property getProperty(String key, String name, int index) {
    Map<String, ConcurrentSkipListSet<Property>> propertiesByKey = propertiesByNameAndKey.get(name);
    if (propertiesByKey == null) {
        return null;
    }
    ConcurrentSkipListSet<Property> properties = propertiesByKey.get(key);
    if (properties == null) {
        return null;
    }
    for (Property property : properties) {
        if (index == 0) {
            return property;
        }
        index--;
    }
    return null;
}
Also used : ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) Property(org.vertexium.Property)

Aggregations

Property (org.vertexium.Property)6 ArrayList (java.util.ArrayList)2 ConcurrentSkipListSet (java.util.concurrent.ConcurrentSkipListSet)2 IOException (java.io.IOException)1 List (java.util.List)1 Map (java.util.Map)1 Stream (java.util.stream.Stream)1 Element (org.vertexium.Element)1 Visibility (org.vertexium.Visibility)1