org.apache.hadoop.hdfs.util
Class ReadOnlyList.Util
java.lang.Object
org.apache.hadoop.hdfs.util.ReadOnlyList.Util
- Enclosing interface:
- org.apache.hadoop.hdfs.util.ReadOnlyList<E>
public static class ReadOnlyList.Util
- extends Object
Utilities for ReadOnlyList
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadOnlyList.Util
public ReadOnlyList.Util()
emptyList
public static <E> org.apache.hadoop.hdfs.util.ReadOnlyList<E> emptyList()
- Returns:
- an empty list.
binarySearch
public static <K,E extends Comparable<K>> int binarySearch(org.apache.hadoop.hdfs.util.ReadOnlyList<E> list,
K key)
- The same as
Collections.binarySearch(List, Object)
except that the list is a ReadOnlyList
.
- Returns:
- the insertion point defined
in
Collections.binarySearch(List, Object)
.
asReadOnlyList
public static <E> org.apache.hadoop.hdfs.util.ReadOnlyList<E> asReadOnlyList(List<E> list)
- Returns:
- a
ReadOnlyList
view of the given list.
asList
public static <E> List<E> asList(org.apache.hadoop.hdfs.util.ReadOnlyList<E> list)
- Returns:
- a
List
view of the given list.
Copyright © 2013 Apache Software Foundation. All Rights Reserved.