Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.util
Class SafeSortedMap.ViewMap

java.lang.Object
  extended by java.util.AbstractMap
      extended by com.tangosol.util.SafeSortedMap.ViewMap

All Implemented Interfaces:
java.util.Map, java.util.SortedMap
Enclosing class:
SafeSortedMap

protected class SafeSortedMap.ViewMap
extends java.util.AbstractMap
implements java.util.SortedMap

ViewMap provides a SortedMap view over a subset of the SafeSortedMap. A ViewMap may have an inclusive lower and/or an exclusive upper bound.

For example, a ViewMap defined on an SafeSortedMap of Integer keys with lower bound 3 and upper bound 7 would contain any keys in the underlying SafeSortedMap in the range [3, 7).


Nested Class Summary
protected  class SafeSortedMap.ViewMap.EntryIterator
          An Iterator over the Entries backed by this ViewMap.
protected  class SafeSortedMap.ViewMap.EntrySet
          A Set of Entries backed by this ViewMap.

 

Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry, java.util.AbstractMap.SimpleImmutableEntry

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry

 

Field Summary
protected  java.lang.Object m_oKeyLower
          The key that this ViewMap is (inclusively) lower-bounded by, or null for no lower-bound.
protected  java.lang.Object m_oKeyUpper
          The key that this ViewMap is (exclusively) upper-bounded by, or null for no upper-bound

 

Constructor Summary
protected SafeSortedMap.ViewMap(java.lang.Object oKeyLower, java.lang.Object oKeyUpper)
          Create a new ViewMap over the SafeSortedMap bounded by the specified keys, or null for no-bound.

 

Method Summary
 java.util.Comparator comparator()
          
 boolean containsKey(java.lang.Object oKey)
          
 java.util.Set entrySet()
          
 java.lang.Object firstKey()
          
protected  SafeSortedMap.EntryNode firstNode()
          Return the first Node in this ViewMap, or null if there are none.
 java.lang.Object get(java.lang.Object oKey)
          
protected  java.lang.Object getLowerBound()
          Return the lower bound of this ViewMap.
protected  java.lang.Object getUpperBound()
          Return the upper bound of this ViewMap.
 java.util.SortedMap headMap(java.lang.Object toKey)
          
protected  boolean inRange(java.lang.Object oKey)
          Is the specified key in the range represented by this ViewMap?
 java.lang.Object lastKey()
          
protected  SafeSortedMap.EntryNode lastNode()
          Return the last SkipNode in this ViewMap, or null if there are none.
 java.lang.Object put(java.lang.Object oKey, java.lang.Object oValue)
          
 java.lang.Object remove(java.lang.Object oKey)
          
 java.util.SortedMap subMap(java.lang.Object fromKey, java.lang.Object toKey)
          
 java.util.SortedMap tailMap(java.lang.Object fromKey)
          

 

Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values

 

Methods inherited from interface java.util.SortedMap
keySet, values

 

Methods inherited from interface java.util.Map
clear, containsValue, equals, hashCode, isEmpty, putAll, size

 

Field Detail

m_oKeyLower

protected final java.lang.Object m_oKeyLower
The key that this ViewMap is (inclusively) lower-bounded by, or null for no lower-bound.

m_oKeyUpper

protected final java.lang.Object m_oKeyUpper
The key that this ViewMap is (exclusively) upper-bounded by, or null for no upper-bound

Constructor Detail

SafeSortedMap.ViewMap

protected SafeSortedMap.ViewMap(java.lang.Object oKeyLower,
                                java.lang.Object oKeyUpper)
Create a new ViewMap over the SafeSortedMap bounded by the specified keys, or null for no-bound.
Parameters:
oKeyLower - the (inclusive) lower-bound key, or null
oKeyUpper - the (exclusive) upper-bound key, or null

Method Detail

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map
Specified by:
entrySet in interface java.util.SortedMap
Specified by:
entrySet in class java.util.AbstractMap

put

public java.lang.Object put(java.lang.Object oKey,
                            java.lang.Object oValue)
Specified by:
put in interface java.util.Map
Overrides:
put in class java.util.AbstractMap

get

public java.lang.Object get(java.lang.Object oKey)
Specified by:
get in interface java.util.Map
Overrides:
get in class java.util.AbstractMap

containsKey

public boolean containsKey(java.lang.Object oKey)
Specified by:
containsKey in interface java.util.Map
Overrides:
containsKey in class java.util.AbstractMap

remove

public java.lang.Object remove(java.lang.Object oKey)
Specified by:
remove in interface java.util.Map
Overrides:
remove in class java.util.AbstractMap

comparator

public java.util.Comparator comparator()
Specified by:
comparator in interface java.util.SortedMap

subMap

public java.util.SortedMap subMap(java.lang.Object fromKey,
                                  java.lang.Object toKey)
Specified by:
subMap in interface java.util.SortedMap

headMap

public java.util.SortedMap headMap(java.lang.Object toKey)
Specified by:
headMap in interface java.util.SortedMap

tailMap

public java.util.SortedMap tailMap(java.lang.Object fromKey)
Specified by:
tailMap in interface java.util.SortedMap

firstKey

public java.lang.Object firstKey()
Specified by:
firstKey in interface java.util.SortedMap

lastKey

public java.lang.Object lastKey()
Specified by:
lastKey in interface java.util.SortedMap

getLowerBound

protected java.lang.Object getLowerBound()
Return the lower bound of this ViewMap.
Returns:
the lower bound of this ViewMap

getUpperBound

protected java.lang.Object getUpperBound()
Return the upper bound of this ViewMap.
Returns:
the upper bound of this ViewMap

inRange

protected boolean inRange(java.lang.Object oKey)
Is the specified key in the range represented by this ViewMap?
Parameters:
oKey - the key to test for
Returns:
true iff the specified key is in the range represented by this ViewMap

firstNode

protected SafeSortedMap.EntryNode firstNode()
Return the first Node in this ViewMap, or null if there are none.
Returns:
the first Node or null if empty, or null

lastNode

protected SafeSortedMap.EntryNode lastNode()
Return the last SkipNode in this ViewMap, or null if there are none.
Returns:
the last SkipNode in this ViewMap, or null

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.