@Override public int lastIndexOf(final Object o) { final int result; final IntSortedSet indices = reverseLookupMap.get(o); if (indices.isEmpty()) { result = -1; } else { result = indices.lastInt(); } return result; }
@Override public int indexOf(final Object o) { final int result; final IntSortedSet indices = reverseLookupMap.get(o); if (indices.isEmpty()) { result = -1; } else { result = indices.first(); } return result; }
public Integer add(K k) { checkK(k); Integer id = timeSortedMap.get(k); if (id == null) { if (!garbageQueue.isEmpty()) { id = garbageQueue.firstInt(); garbageQueue.remove(id); } else { id = length++; } timeSortedMap.put(k, id); ensureArraySize(id); countMap[id] = 1; } else { countMap[id]++; } return id; }
public Integer add(K k) { checkK(k); Integer id = timeSortedMap.get(k); if (id == null) { if (!garbageQueue.isEmpty()) { id = garbageQueue.firstInt(); garbageQueue.remove(id); } else { id = length++; } timeSortedMap.put(k, id); ensureArraySize(id); countMap[id] = 1; } else { countMap[id]++; } return id; }
@Override public int enableInstance( final R2TransformOrthogonalReadableType t) { NullCheck.notNull(t); if (this.enabledCount() == this.max_size) { final StringBuilder sb = new StringBuilder(64); sb.append("Batch is full (capacity is "); sb.append(this.max_size); sb.append(")"); throw new R2ExceptionBatchIsFull(sb.toString()); } Preconditions.checkPrecondition( !this.free.isEmpty(), "Free set must not be empty"); final int next = this.free.firstInt(); this.members[next] = t; this.free.remove(next); return next; }
protected int addLeaf(final Octant octant) { int id; if (!garbageQueue.isEmpty()) { id = garbageQueue.firstInt(); garbageQueue.remove(id); } else { id = length++; ensureArraySize(id); } leaves[id] = octant; leavesCount++; octant.leafId = id; return id; }
protected int addView(final GraphViewImpl view) { checkNonNullViewObject(view); int id; if (!garbageQueue.isEmpty()) { id = garbageQueue.firstInt(); garbageQueue.remove(id); } else { id = length++; ensureArraySize(id); } views[id] = view; view.storeId = id; return id; }
protected int addView(final GraphViewImpl view) { checkNonNullViewObject(view); int id; if (!garbageQueue.isEmpty()) { id = garbageQueue.firstInt(); garbageQueue.remove(id); } else { id = length++; ensureArraySize(id); } views[id] = view; view.storeId = id; return id; }
if ( indexedFields.isEmpty() ) {
if ( indexedFields.isEmpty() ) {
if ( indexedFields.isEmpty() ) {
if ( indexedFields.isEmpty() ) {