|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.adfnmc.java.util.AbstractMap
oracle.adfnmc.java.util.TreeMap
public class TreeMap
TreeMap is an implementation of SortedMap. All optional operations are supported, adding and removing. The values can be any objects. The keys can be any objects which are comparable to each other either using their natural order or a specified Comparator.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface oracle.adfnmc.java.util.Map |
|---|
Map.Entry |
| Constructor Summary | |
|---|---|
TreeMap()
Constructs a new empty instance of spec.TreeMap. |
|
TreeMap(Comparator comparator)
Constructs a new empty instance of spec.TreeMap which uses the specified Comparator. |
|
TreeMap(Map map)
Constructs a new instance of spec.TreeMap containing the mappings from the specified Map and using the natural ordering. |
|
TreeMap(SortedMap map)
Constructs a new instance of spec.TreeMap containing the mappings from the specified SortedMap and using the same Comparator. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all mappings from this spec.TreeMap, leaving it empty. |
java.lang.Object |
clone()
Answers a new spec.TreeMap with the same mappings, size and comparator as this spec.TreeMap. |
Comparator |
comparator()
Answers the Comparator used to compare elements in this spec.TreeMap. |
boolean |
containsKey(java.lang.Object key)
Searches this spec.TreeMap for the specified key. |
boolean |
containsValue(java.lang.Object value)
Searches this spec.TreeMap for the specified value. |
Set |
entrySet()
Answers a Set of the mappings contained in this spec.TreeMap. |
java.lang.Object |
firstKey()
Answers the first sorted key in this spec.TreeMap. |
java.lang.Object |
get(java.lang.Object key)
Answers the value of the mapping with the specified key. |
SortedMap |
headMap(java.lang.Object endKey)
Answers a SortedMap of the specified portion of this spec.TreeMap which contains keys less than the end key. |
Set |
keySet()
Answers a Set of the keys contained in this spec.TreeMap. |
java.lang.Object |
lastKey()
Answer the last sorted key in this spec.TreeMap. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified value. |
void |
putAll(Map map)
Copies every mapping in the specified Map to this spec.TreeMap. |
java.lang.Object |
remove(java.lang.Object key)
Removes a mapping with the specified key from this spec.TreeMap. |
int |
size()
Answers the number of mappings in this spec.TreeMap. |
SortedMap |
subMap(java.lang.Object startKey,
java.lang.Object endKey)
Answers a SortedMap of the specified portion of this spec.TreeMap which contains keys greater or equal to the start key but less than the end key. |
SortedMap |
tailMap(java.lang.Object startKey)
Answers a SortedMap of the specified portion of this spec.TreeMap which contains keys greater or equal to the start key. |
Collection |
values()
Answers a Collection of the values contained in this spec.TreeMap. |
| Methods inherited from class oracle.adfnmc.java.util.AbstractMap |
|---|
equals, hashCode, isEmpty, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.adfnmc.java.util.Map |
|---|
equals, hashCode, isEmpty |
| Constructor Detail |
|---|
public TreeMap()
public TreeMap(Comparator comparator)
comparator - the Comparatorpublic TreeMap(Map map)
map - the mappings to add
java.lang.ClassCastException - when a key in the Map does not implement the Comparable interface, or they keys in the Map cannot be
comparedpublic TreeMap(SortedMap map)
map - the mappings to add| Method Detail |
|---|
public void clear()
clear in interface Mapclear in class AbstractMapMap.isEmpty(),
sizepublic java.lang.Object clone()
clone in class AbstractMapCloneablepublic Comparator comparator()
comparator in interface SortedMappublic boolean containsKey(java.lang.Object key)
containsKey in interface MapcontainsKey in class AbstractMapkey - the object to search for
key is a key of this spec.TreeMap, false otherwise
java.lang.ClassCastException - when the key cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when the key is null and the comparator cannot handle nullpublic boolean containsValue(java.lang.Object value)
containsValue in interface MapcontainsValue in class AbstractMapvalue - the object to search for
value is a value of this spec.TreeMap, false otherwisepublic Set entrySet()
entrySet in interface MapentrySet in class AbstractMappublic java.lang.Object firstKey()
firstKey in interface SortedMapjava.util.NoSuchElementException - when this spec.TreeMap is emptypublic java.lang.Object get(java.lang.Object key)
get in interface Mapget in class AbstractMapkey - the key
java.lang.ClassCastException - when the key cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when the key is null and the comparator cannot handle nullpublic SortedMap headMap(java.lang.Object endKey)
headMap in interface SortedMapendKey - the end key
endKey
java.lang.ClassCastException - when the end key cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when the end key is null and the comparator cannot handle nullpublic Set keySet()
keySet in interface MapkeySet in class AbstractMappublic java.lang.Object lastKey()
lastKey in interface SortedMapjava.util.NoSuchElementException - when this spec.TreeMap is empty
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface Mapput in class AbstractMapkey - the keyvalue - the value
java.lang.ClassCastException - when the key cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when the key is null and the comparator cannot handle nullpublic void putAll(Map map)
putAll in interface MapputAll in class AbstractMapmap - the Map to copy mappings from
java.lang.ClassCastException - when a key in the Map cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when a key in the Map is null and the comparator cannot handle nullpublic java.lang.Object remove(java.lang.Object key)
remove in interface Mapremove in class AbstractMapkey - the key of the mapping to remove
java.lang.ClassCastException - when the key cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when the key is null and the comparator cannot handle nullpublic int size()
size in interface Mapsize in class AbstractMap
public SortedMap subMap(java.lang.Object startKey,
java.lang.Object endKey)
subMap in interface SortedMapstartKey - the start keyendKey - the end key
startKey and less than endKey
java.lang.ClassCastException - when the start or end key cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when the start or end key is null and the comparator cannot handle nullpublic SortedMap tailMap(java.lang.Object startKey)
tailMap in interface SortedMapstartKey - the start key
startKey
java.lang.ClassCastException - when the start key cannot be compared with the keys in this spec.TreeMap
java.lang.NullPointerException - when the start key is null and the comparator cannot handle nullpublic Collection values()
values in interface Mapvalues in class AbstractMap
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||