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

How to use
unmodifiableSortedMap
method
in
java.util.Collections

Best Java code snippets using java.util.Collections.unmodifiableSortedMap (Showing top 20 results out of 1,926)

origin: google/guava

@Override
protected SortedMap<K, V> delegate() {
 return Collections.unmodifiableSortedMap(delegate);
}
origin: google/guava

private static <K, V> Map<K, V> unmodifiableMap(Map<K, ? extends V> map) {
 if (map instanceof SortedMap) {
  return Collections.unmodifiableSortedMap((SortedMap<K, ? extends V>) map);
 } else {
  return Collections.unmodifiableMap(map);
 }
}
origin: google/guava

 @Override
 protected SortedMap<String, String> create(Entry<String, String>[] entries) {
  SortedMap<String, String> map = populate(new TreeMap<String, String>(), entries);
  return Collections.unmodifiableSortedMap(map);
 }
})
origin: prestodb/presto

@Override
protected SortedMap<K, V> delegate() {
 return Collections.unmodifiableSortedMap(delegate);
}
origin: springside/springside4

/**
 * 返回包装后不可修改的有序Map.
 * 
 * @see java.util.Collections#unmodifiableSortedMap(SortedMap)
 */
public static <K, V> SortedMap<K, V> unmodifiableSortedMap(final SortedMap<K, ? extends V> m) {
  return Collections.unmodifiableSortedMap(m);
}
origin: google/j2objc

private static <K, V> Map<K, V> unmodifiableMap(Map<K, ? extends V> map) {
 if (map instanceof SortedMap) {
  return Collections.unmodifiableSortedMap((SortedMap<K, ? extends V>) map);
 } else {
  return Collections.unmodifiableMap(map);
 }
}
origin: vipshop/vjtools

/**
 * 返回包装后不可修改的有序Map.
 * 
 * @see java.util.Collections#unmodifiableSortedMap(SortedMap)
 */
public static <K, V> SortedMap<K, V> unmodifiableSortedMap(final SortedMap<K, ? extends V> m) {
  return Collections.unmodifiableSortedMap(m);
}
origin: SonarSource/sonarqube

public SortedMap<Integer, Integer> hitsByLine() {
 return Collections.unmodifiableSortedMap(hitsByLine);
}
origin: SonarSource/sonarqube

public SortedMap<Integer, Integer> conditionsByLine() {
 return Collections.unmodifiableSortedMap(conditionsByLine);
}
origin: SonarSource/sonarqube

public SortedMap<Integer, Integer> coveredConditionsByLine() {
 return Collections.unmodifiableSortedMap(coveredConditionsByLine);
}
origin: prestodb/presto

private static <K, V> Map<K, V> unmodifiableMap(Map<K, ? extends V> map) {
 if (map instanceof SortedMap) {
  return Collections.unmodifiableSortedMap((SortedMap<K, ? extends V>) map);
 } else {
  return Collections.unmodifiableMap(map);
 }
}
origin: wildfly/wildfly

private static <K, V> Map<K, V> unmodifiableMap(Map<K, ? extends V> map) {
 if (map instanceof SortedMap) {
  return Collections.unmodifiableSortedMap((SortedMap<K, ? extends V>) map);
 } else {
  return Collections.unmodifiableMap(map);
 }
}
origin: jenkinsci/jenkins

/**
 * Gets all the builds in a map.
 */
public SortedMap<Integer, RunT> getBuildsAsMap() {
  return Collections.<Integer, RunT>unmodifiableSortedMap(_getRuns());
}
origin: jenkinsci/jenkins

/**
 * Returns a read-only view of records that has already been loaded.
 */
public SortedMap<Integer,R> getLoadedBuilds() {
  return Collections.unmodifiableSortedMap(new BuildReferenceMapAdapter<R>(this, index.byNumber));
}
origin: google/guava

@Override
public SortedMap<R, Map<C, V>> rowMap() {
 Function<Map<C, V>, Map<C, V>> wrapper = unmodifiableWrapper();
 return Collections.unmodifiableSortedMap(Maps.transformValues(delegate().rowMap(), wrapper));
}
origin: commons-io/commons-io

/**
 * Constructs a sorted map from canonical charset names to charset objects required of every implementation of the
 * Java platform.
 * <p>
 * From the Java documentation <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html">
 * Standard charsets</a>:
 * </p>
 *
 * @return An immutable, case-insensitive map from canonical charset names to charset objects.
 * @see Charset#availableCharsets()
 * @since 2.5
 */
public static SortedMap<String, Charset> requiredCharsets() {
  // maybe cache?
  final TreeMap<String, Charset> m = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
  m.put(StandardCharsets.ISO_8859_1.name(), StandardCharsets.ISO_8859_1);
  m.put(StandardCharsets.US_ASCII.name(), StandardCharsets.US_ASCII);
  m.put(StandardCharsets.UTF_16.name(), StandardCharsets.UTF_16);
  m.put(StandardCharsets.UTF_16BE.name(), StandardCharsets.UTF_16BE);
  m.put(StandardCharsets.UTF_16LE.name(), StandardCharsets.UTF_16LE);
  m.put(StandardCharsets.UTF_8.name(), StandardCharsets.UTF_8);
  return Collections.unmodifiableSortedMap(m);
}
origin: wildfly/wildfly

@Override
public SortedMap<R, Map<C, V>> rowMap() {
 Function<Map<C, V>, Map<C, V>> wrapper = unmodifiableWrapper();
 return Collections.unmodifiableSortedMap(Maps.transformValues(delegate().rowMap(), wrapper));
}
origin: prestodb/presto

@Override
public SortedMap<R, Map<C, V>> rowMap() {
 Function<Map<C, V>, Map<C, V>> wrapper = unmodifiableWrapper();
 return Collections.unmodifiableSortedMap(Maps.transformValues(delegate().rowMap(), wrapper));
}
origin: prestodb/presto

  private static SortedMap<Integer, Object> indexObjectValues(Type type, Block block)
  {
    SortedMap<Integer, Object> values = new TreeMap<>();
    for (int position = 0; position < block.getPositionCount(); position++) {
      values.put(position, type.getObjectValue(SESSION, block, position));
    }
    return unmodifiableSortedMap(values);
  }
}
origin: jenkinsci/jenkins

/**
 * @param fromKey
 *      Biggest build number to be in the returned set.
 * @param toKey
 *      Smallest build number-1 to be in the returned set (-1 because this is exclusive)
 */
public SortedMap<Integer, R> subMap(Integer fromKey, Integer toKey) {
  // TODO: if this method can produce a lazy map, that'd be wonderful
  // because due to the lack of floor/ceil/higher/lower kind of methods
  // to look up keys in SortedMap, various places of Jenkins rely on
  // subMap+firstKey/lastKey combo.
  R start = search(fromKey, DESC);
  if (start==null)    return EMPTY_SORTED_MAP;
  R end = search(toKey, ASC);
  if (end==null)      return EMPTY_SORTED_MAP;
  for (R i=start; i!=end; ) {
    i = search(getNumberOf(i)-1,DESC);
    assert i!=null;
  }
  return Collections.unmodifiableSortedMap(new BuildReferenceMapAdapter<R>(this, index.byNumber.subMap(fromKey, toKey)));
}
java.utilCollectionsunmodifiableSortedMap

Javadoc

Returns a wrapper on the specified sorted map which throws an UnsupportedOperationException whenever an attempt is made to modify the sorted map.

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
  • Top plugins for Android Studio
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