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

How to use
unmodifiableNavigableSet
method
in
java.util.Collections

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

origin: google/guava

 @Override
 public NavigableSet<String> create(String[] elements) {
  NavigableSet<String> innerSet = new TreeSet<>();
  Collections.addAll(innerSet, elements);
  return Collections.unmodifiableNavigableSet(innerSet);
 }
})
origin: linkedin/cruise-control

/**
 * Get the sorted replicas in the ascending order of their priority and score.
 * This method initialize the sorted replicas if it hasn't been initialized.
 *
 * @return the sorted replicas in the ascending order of their priority and score.
 */
public NavigableSet<ReplicaWrapper> sortedReplicas() {
 ensureInitialize();
 return Collections.unmodifiableNavigableSet(_sortedReplicas);
}
origin: wildfly/wildfly

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());
classes.add(Collections.unmodifiableSortedMap(Collections.emptySortedMap()).getClass());
origin: wildfly/wildfly

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"))));
assertTrue(immutability.test(Collections.unmodifiableSortedMap(new TreeMap<>(Collections.singletonMap("1", "2")))));
origin: Javacord/Javacord

/**
 * Creates a new message set.
 *
 * @param messages The messages to be contained in this set.
 */
public MessageSetImpl(NavigableSet<Message> messages) {
  this.messages = Collections.unmodifiableNavigableSet(messages);
}
origin: com.google.guava/guava-testlib

 @Override
 public NavigableSet<String> create(String[] elements) {
  NavigableSet<String> innerSet = new TreeSet<>();
  Collections.addAll(innerSet, elements);
  return Collections.unmodifiableNavigableSet(innerSet);
 }
})
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

 private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
  TreeSet<T> set = reverse
    ? new TreeSet<T>(Collections.reverseOrder())
    : new TreeSet<T>();
  set.addAll(list);
  return Collections.unmodifiableNavigableSet(set);
 }
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.syndesis.common/common-model

private static <T extends Comparable<T>> NavigableSet<T> createUnmodifiableSortedSet(boolean reverse, List<T> list) {
 TreeSet<T> set = reverse
   ? new TreeSet<T>(Collections.reverseOrder())
   : new TreeSet<T>();
 set.addAll(list);
 return Collections.unmodifiableNavigableSet(set);
}
origin: io.permazen/permazen-coreapi

/**
 * 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());
}
origin: org.jsimpledb/jsimpledb-coreapi

@Override
void lockDownRecurse() {
  super.lockDownRecurse();
  if (this.objectTypes != null)
    this.objectTypes = Collections.unmodifiableNavigableSet(this.objectTypes);
}
origin: io.permazen/permazen-coreapi

@Override
void lockDownRecurse() {
  super.lockDownRecurse();
  if (this.objectTypes != null)
    this.objectTypes = Collections.unmodifiableNavigableSet(this.objectTypes);
}
origin: org.jsimpledb/jsimpledb-coreapi

/**
 * 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());
}
java.utilCollectionsunmodifiableNavigableSet

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

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Runner (org.openjdk.jmh.runner)
  • 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