public RelationCache(final Direction direction, final long typeId, final long relationId, final Object other, final LongObjectHashMap<Object> properties) { this.direction = direction; this.typeId = typeId; this.relationId = relationId; this.other = other; this.properties = (properties == null || properties.size() > 0) ? properties : EMPTY; }
public static LongArrayList singleton(long el) { LongArrayList l = new LongArrayList(1); l.add(el); return l; }
ByteVertex(long id, LongObjectMap<ConcurrentSkipListSet<ByteEntry>> tx) { super(id); this.tx = tx; this.set = (SortedSet<ByteEntry>) tx.get(id); }
private ObjectIntMap<Instruction> getInstructionIndexes(BasicBlock block) { ObjectIntMap<Instruction> indexes = new ObjectIntHashMap<>(); for (Instruction instruction : block) { indexes.put(instruction, indexes.size()); } return indexes; }
@Override public int size() { return vertices.size(); }
public VertexLongList(StandardTitanTx tx) { this(tx,new LongArrayList(10),true); }
@Override public long getID(int pos) { return vertices.get(pos); }
public boolean add(int value) { return super.put(value, defaultValue)==0; }
@SuppressWarnings("unchecked") public <O> O get(long key) { return (O) properties.get(key); }
public IntegerDoubleFrequency() { counts = new IntDoubleHashMap(); total = 0; }
@Override public int size() { return super.size(); }
public double getCount(int value) { return counts.get(value); }
public boolean contains(int value) { return super.containsKey(value); }
public boolean hasProperties() { return properties != null && !properties.isEmpty(); }
public int getN() { return counts.size(); }
public IntCollection getValues() { return counts.keys(); }
public Iterator<LongObjectCursor<Object>> propertyIterator() { return properties.iterator(); }
public int numProperties() { return properties.size(); }