ImmutableList.Builder<Field> fieldsBuilder = ImmutableList.builder(); int size = field.split("\\.").length; Iterator<String> iterator = fieldsMap.navigableKeySet().iterator(); while (iterator.hasNext()) { String name = iterator.next();
boolean v2Bigger = false; SortedSet<Short> v1Nodes = v1.getVersionMap().navigableKeySet(); SortedSet<Short> v2Nodes = v2.getVersionMap().navigableKeySet();
public int toBytes(byte[] buf, int offset) { // write the number of versions ByteUtils.writeShort(buf, (short) versionMap.size(), offset); offset += ByteUtils.SIZE_OF_SHORT; // write the size of each version in bytes byte versionSize = ByteUtils.numberOfBytesRequired(getMaxVersion()); buf[offset] = versionSize; offset++; int clockEntrySize = ByteUtils.SIZE_OF_SHORT + versionSize; SortedSet<Short> nodeIds = versionMap.navigableKeySet(); for(Short nodeId: nodeIds) { Long version = versionMap.get(nodeId); ByteUtils.writeShort(buf, nodeId, offset); ByteUtils.writeBytes(buf, version, offset + ByteUtils.SIZE_OF_SHORT, versionSize); offset += clockEntrySize; } ByteUtils.writeLong(buf, this.timestamp, offset); return sizeInBytes(); }
dbName = dbName.toLowerCase(); catName = normalizeSpace(catName).toLowerCase(); partitions.navigableKeySet(); for (Object[] fields : sqlResult) {
/** * {@inheritDoc} */ @Override public SortedSet<String> getPaths() { return Collections.unmodifiableSortedSet(keyMap.navigableKeySet()); }
/** * {@inheritDoc} */ @Override public SortedSet<String> getPaths() { return Collections.unmodifiableSortedSet(keyMap.navigableKeySet()); }
/** * Get the names of all {@link SchemaObjectType}s. * * @return unmodifiable set of {@link SchemaObjectType} names */ public NavigableSet<String> getSchemaObjectTypeNames() { return Collections.unmodifiableNavigableSet(this.typeMap.navigableKeySet()); }
/** @return events for this year. Never returns <i>null</i>. */ public List<PlanetaryEvent> getEvents(int year) { if( null == events ) { return Collections.<PlanetaryEvent>emptyList(); } List<PlanetaryEvent> result = new ArrayList<PlanetaryEvent>(); for( DateTime date : events.navigableKeySet() ) { if( date.getYear() > year ) { break; } if( date.getYear() == year ) { result.add(events.get(date)); } } return result; }
/** * Get the names of all {@link SchemaObjectType}s. * * @return unmodifiable set of {@link SchemaObjectType} names */ public NavigableSet<String> getSchemaObjectTypeNames() { return Collections.unmodifiableNavigableSet(this.typeMap.navigableKeySet()); }
synchronized Iterator<Bytes> allKeys() { return keySetIterator(cache.navigableKeySet()); }
public FactionListModel(DateTime date) { for(Faction faction : Faction.getFactions()) { factionMap.put(faction.getFullName(date.getYear()), faction); } names = new ArrayList<>(factionMap.navigableKeySet()); }
protected <T> T getEventData(DateTime when, T defaultValue, EventGetter<T> getter) { if( null == when || null == events || null == getter ) { return defaultValue; } T result = defaultValue; for( DateTime date : events.navigableKeySet() ) { if( date.isAfter(when) ) { break; } result = Utilities.nonNull(getter.get(events.get(date)), result); } return result; }
@Override public KeyValueIterator<K, V> all() { final TreeMap<K, V> treeMap = toTreeMap(); return new MemoryNavigableLRUCache.CacheIterator<>(treeMap.navigableKeySet().iterator(), treeMap); }
synchronized Iterator<Bytes> keyRange(final Bytes from, final Bytes to) { return keySetIterator(cache.navigableKeySet().subSet(from, true, to, true)); }
ActivityStackGraph(TreeMap<Long, Map<String, Set<UUID>>> activityData, String[] colors, Formatter<Long> dayFormatter) { super(getLabels(activityData.navigableKeySet(), dayFormatter), getDataSets(activityData, colors)); }
/** * Get all of the names of {@link SchemaField}s in the given {@link SchemaObjectType}. * * @param type schema object * @return unmodifiable set of {@link SchemaField} names in {@code type} * @throws IllegalArgumentException if {@code type} is not indexed by this instance */ public NavigableSet<String> getSchemaFieldNames(SchemaObjectType type) { Preconditions.checkArgument(type != null, "null type"); final TreeMap<String, SchemaField> fieldMap = this.typeFieldMap.get(type.getStorageId()); if (fieldMap == null) throw new IllegalArgumentException("unknown type `" + type.getName() + "' with storage ID " + type.getStorageId()); return Collections.unmodifiableNavigableSet(fieldMap.navigableKeySet()); }
/** * Get all of the names of {@link SchemaField}s in the given {@link SchemaObjectType}. * * @param type schema object * @return unmodifiable set of {@link SchemaField} names in {@code type} * @throws IllegalArgumentException if {@code type} is not indexed by this instance */ public NavigableSet<String> getSchemaFieldNames(SchemaObjectType type) { Preconditions.checkArgument(type != null, "null type"); final TreeMap<String, SchemaField> fieldMap = this.typeFieldMap.get(type.getStorageId()); if (fieldMap == null) throw new IllegalArgumentException("unknown type `" + type.getName() + "' with storage ID " + type.getStorageId()); return Collections.unmodifiableNavigableSet(fieldMap.navigableKeySet()); }
/** * Get all of the names of {@link SchemaCompositeIndex}s in the given {@link SchemaObjectType}. * * @param type schema object * @return unmodifiable set of {@link SchemaCompositeIndex} names in {@code type} * @throws IllegalArgumentException if {@code type} is not indexed by this instance */ public NavigableSet<String> getSchemaCompositeIndexNames(SchemaObjectType type) { Preconditions.checkArgument(type != null, "null type"); final TreeMap<String, SchemaCompositeIndex> indexMap = this.typeCompositeIndexMap.get(type.getStorageId()); if (indexMap == null) throw new IllegalArgumentException("unknown type `" + type.getName() + "' with storage ID " + type.getStorageId()); return Collections.unmodifiableNavigableSet(indexMap.navigableKeySet()); } }
/** * Get all of the names of {@link SchemaCompositeIndex}s in the given {@link SchemaObjectType}. * * @param type schema object * @return unmodifiable set of {@link SchemaCompositeIndex} names in {@code type} * @throws IllegalArgumentException if {@code type} is not indexed by this instance */ public NavigableSet<String> getSchemaCompositeIndexNames(SchemaObjectType type) { Preconditions.checkArgument(type != null, "null type"); final TreeMap<String, SchemaCompositeIndex> indexMap = this.typeCompositeIndexMap.get(type.getStorageId()); if (indexMap == null) throw new IllegalArgumentException("unknown type `" + type.getName() + "' with storage ID " + type.getStorageId()); return Collections.unmodifiableNavigableSet(indexMap.navigableKeySet()); } }
@Override public KeyValueIterator<K, V> range(final K from, final K to) { final TreeMap<K, V> treeMap = toTreeMap(); return new DelegatingPeekingKeyValueIterator<>(name(), new MemoryNavigableLRUCache.CacheIterator<>(treeMap.navigableKeySet().subSet(from, true, to, true).iterator(), treeMap)); }