Tabnine Logo
Collections.unmodifiableNavigableMap
Code IndexAdd Tabnine to your IDE (free)

How to use
unmodifiableNavigableMap
method
in
java.util.Collections

Best Java code snippets using java.util.Collections.unmodifiableNavigableMap (Showing top 20 results out of 315)

origin: google/guava

 @Override
 protected NavigableMap<String, String> create(Entry<String, String>[] entries) {
  return Collections.unmodifiableNavigableMap(populate(new TreeMap<>(), entries));
 }
})
origin: neo4j/neo4j

@Override
@Nullable
public NavigableMap<ValueTuple, ? extends LongDiffSets> getSortedIndexUpdates( SchemaDescriptor descriptor )
{
  if ( indexUpdates == null )
  {
    return null;
  }
  Map<ValueTuple, MutableLongDiffSets> updates = indexUpdates.get( descriptor );
  if ( updates == null )
  {
    return null;
  }
  TreeMap<ValueTuple, MutableLongDiffSets> sortedUpdates;
  if ( updates instanceof TreeMap )
  {
    sortedUpdates = (TreeMap<ValueTuple, MutableLongDiffSets>) updates;
  }
  else
  {
    sortedUpdates = new TreeMap<>( ValueTuple.COMPARATOR );
    sortedUpdates.putAll( updates );
    indexUpdates.put( descriptor, sortedUpdates );
  }
  return Collections.unmodifiableNavigableMap( sortedUpdates );
}
origin: wildfly/wildfly

classes.add(Collections.unmodifiableList(nonRandomAccessList).getClass());
classes.add(Collections.unmodifiableMap(Collections.emptyMap()).getClass());
classes.add(Collections.unmodifiableNavigableMap(Collections.emptyNavigableMap()).getClass());
classes.add(Collections.unmodifiableNavigableSet(Collections.emptyNavigableSet()).getClass());
classes.add(Collections.unmodifiableSet(Collections.emptySet()).getClass());
origin: wildfly/wildfly

assertTrue(immutability.test(Collections.unmodifiableList(Arrays.asList("1", "2"))));
assertTrue(immutability.test(Collections.unmodifiableMap(Collections.singletonMap("1", "2"))));
assertTrue(immutability.test(Collections.unmodifiableNavigableMap(new TreeMap<>(Collections.singletonMap("1", "2")))));
assertTrue(immutability.test(Collections.unmodifiableNavigableSet(new TreeSet<>(Collections.singleton("1")))));
assertTrue(immutability.test(Collections.unmodifiableSet(Collections.singleton("1"))));
origin: apache/storm

this.supervisorClasspaths = Collections.unmodifiableNavigableMap(
origin: org.elasticsearch.client/elasticsearch-rest-high-level-client

GetAutoFollowPatternResponse(NavigableMap<String, Pattern> patterns) {
  this.patterns = Collections.unmodifiableNavigableMap(patterns);
}
origin: org.elasticsearch.client/elasticsearch-rest-high-level-client

IndicesFollowStats(NavigableMap<String, List<ShardFollowStats>> shardFollowStats) {
  this.shardFollowStats = Collections.unmodifiableNavigableMap(shardFollowStats);
}
origin: axkr/symja_android_library

UnitImpl(NavigableMap<String, IExpr> navigableMap) {
  this.navigableMap = Collections.unmodifiableNavigableMap(navigableMap);
}
origin: com.google.guava/guava-testlib

 @Override
 protected NavigableMap<String, String> create(Entry<String, String>[] entries) {
  return Collections.unmodifiableNavigableMap(populate(new TreeMap<>(), entries));
 }
})
origin: org.ogema.widgets/ogema-js-bundle

@Override
public NavigableMap<Long, ReceivedMessage> getMessages(MessageStatus status) {
  switch(status) {
  case CREATED:
    return Collections.unmodifiableNavigableMap(messages.unreadMessages);
  case READ:
    return Collections.unmodifiableNavigableMap(messages.readMessages);
  case DELETED:
    return Collections.unmodifiableNavigableMap(messages.deletedMessages);
  default: 
    return Collections.emptyNavigableMap();
  }
}
origin: pravega/pravega

/**
 * Creates a new instance of the StreamSegments class.
 *
 * @param segments Segments of a stream, keyed by the largest key in their key range.
 *                 i.e. If there are two segments split evenly, the first should have a value of 0.5 and the second 1.0.
 * @param delegationToken Delegation token to access the segments in the segmentstore
 */
public StreamSegments(NavigableMap<Double, SegmentWithRange> segments, String delegationToken) {
  this.segments = Collections.unmodifiableNavigableMap(segments);
  this.delegationToken = delegationToken;
  verifySegments();
}
origin: org.apache.sshd/sshd-osgi

public NavigableMap<K, V> immutable() {
  return Collections.unmodifiableNavigableMap(build());
}
origin: org.ogema.widgets/ogema-js-bundle

private NavigableMap<Long, ReceivedMessage> getMessages(long tm, MessageStatus status) {
  switch(status) {
  case SENT:
    return Collections.unmodifiableNavigableMap(messages.unreadMessages.tailMap(tm));
  case READ:
    return Collections.unmodifiableNavigableMap(messages.readMessages.tailMap(tm));
  case DELETED:
    return Collections.unmodifiableNavigableMap(messages.deletedMessages.tailMap(tm));
  default: 
    return Collections.emptyNavigableMap();
  }
}
 
origin: org.jsimpledb/jsimpledb-coreapi

@Override
void lockDownRecurse() {
  super.lockDownRecurse();
  this.schemaFields = Collections.unmodifiableNavigableMap(this.schemaFields);
  for (SchemaField schemaField : this.schemaFields.values())
    schemaField.lockDown();
  this.schemaCompositeIndexes = Collections.unmodifiableNavigableMap(this.schemaCompositeIndexes);
  for (SchemaCompositeIndex schemaCompositeIndex : this.schemaCompositeIndexes.values())
    schemaCompositeIndex.lockDown();
}
origin: io.permazen/permazen-coreapi

@Override
void lockDownRecurse() {
  super.lockDownRecurse();
  this.schemaFields = Collections.unmodifiableNavigableMap(this.schemaFields);
  for (SchemaField schemaField : this.schemaFields.values())
    schemaField.lockDown();
  this.schemaCompositeIndexes = Collections.unmodifiableNavigableMap(this.schemaCompositeIndexes);
  for (SchemaCompositeIndex schemaCompositeIndex : this.schemaCompositeIndexes.values())
    schemaCompositeIndex.lockDown();
}
origin: org.apache.bookkeeper/stream-storage-java-client-base

public static HashStreamRanges ofHash(RangeKeyType keyType,
                   NavigableMap<Long, RangeProperties> ranges) {
  checkArgument(RangeKeyType.HASH == keyType,
    "Only hash routing is supported now. %s is not supported.", keyType);
  NavigableMap<Long, RangeProperties> readOnlyRanges = Collections.unmodifiableNavigableMap(ranges);
  long maxRangeId = 0L;
  for (RangeProperties props : ranges.values()) {
    maxRangeId = Math.max(maxRangeId, props.getRangeId());
  }
  return new HashStreamRanges(readOnlyRanges, maxRangeId);
}
origin: org.jsimpledb/jsimpledb-coreapi

@Override
void lockDownRecurse() {
  super.lockDownRecurse();
  this.schemaObjectTypes = Collections.unmodifiableNavigableMap(this.schemaObjectTypes);
  for (SchemaObjectType schemaObjectType : this.schemaObjectTypes.values())
    schemaObjectType.lockDown();
}
origin: io.permazen/permazen-coreapi

@Override
void lockDownRecurse() {
  super.lockDownRecurse();
  this.schemaObjectTypes = Collections.unmodifiableNavigableMap(this.schemaObjectTypes);
  for (SchemaObjectType schemaObjectType : this.schemaObjectTypes.values())
    schemaObjectType.lockDown();
}
origin: MartinHaeusler/chronos

private NavigableMap<Long, byte[]> getMapForReading(final MapDBTransaction tx) {
  checkNotNull(tx, "Precondition violation - argument 'tx' must not be NULL!");
  String mapName = this.getBranchName() + MAP_SUFFIX;
  if (tx.exists(mapName)) {
    return Collections.unmodifiableNavigableMap(tx.treeMap(mapName, Serializer.LONG, Serializer.BYTE_ARRAY));
  } else {
    return Collections.emptyNavigableMap();
  }
}
origin: org.apache.calcite/calcite-core

/** Returns a map containing all the entries in the map that match the given
 * name. If case-sensitive, that map will have 0 or 1 elements; if
 * case-insensitive, it may have 0 or more. */
public NavigableMap<String, V> range(String name, boolean caseSensitive) {
 Object floorKey;
 Object ceilingKey;
 if (caseSensitive) {
  floorKey = name;
  ceilingKey = name;
 } else {
  floorKey = COMPARATOR.floorKey(name);
  ceilingKey = COMPARATOR.ceilingKey(name);
 }
 NavigableMap subMap = ((NavigableMap) map).subMap(floorKey, true, ceilingKey, true);
 return Collections.unmodifiableNavigableMap((NavigableMap<String, V>) subMap);
}
java.utilCollectionsunmodifiableNavigableMap

Popular methods of Collections

  • emptyList
    Returns the empty list (immutable). This list is serializable.This example illustrates the type-safe
  • sort
  • singletonList
    Returns an immutable list containing only the specified object. The returned list is serializable.
  • unmodifiableList
    Returns an unmodifiable view of the specified list. This method allows modules to provide users with
  • emptyMap
    Returns the empty map (immutable). This map is serializable.This example illustrates the type-safe w
  • emptySet
    Returns the empty set (immutable). This set is serializable. Unlike the like-named field, this metho
  • unmodifiableMap
    Returns an unmodifiable view of the specified map. This method allows modules to provide users with
  • singleton
    Returns an immutable set containing only the specified object. The returned set is serializable.
  • unmodifiableSet
    Returns an unmodifiable view of the specified set. This method allows modules to provide users with
  • singletonMap
    Returns an immutable map, mapping only the specified key to the specified value. The returned map is
  • addAll
    Adds all of the specified elements to the specified collection. Elements to be added may be specifie
  • reverse
    Reverses the order of the elements in the specified list. This method runs in linear time.
  • addAll,
  • reverse,
  • unmodifiableCollection,
  • shuffle,
  • enumeration,
  • list,
  • synchronizedMap,
  • synchronizedList,
  • reverseOrder,
  • emptyIterator

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now