|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.TreeMap
org.apache.jdo.impl.sco.TreeMap
public class TreeMap
A mutable 2nd class object that represents TreeMap.
TreeMap
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
TreeMap(java.lang.Class keyType,
java.lang.Class valueType,
boolean allowNulls)
Creates a new empty TreeMap object. |
|
TreeMap(java.lang.Class keyType,
java.lang.Class valueType,
boolean allowNulls,
java.util.Comparator c)
Creates a new empty TreeMap object that has
the specified initial capacity. |
Method Summary | |
---|---|
boolean |
allowNulls()
Returns whether nulls are permitted as keys or values. |
void |
clear()
Removes all of the elements from this map. |
void |
clearInternal()
Clears Map without recording the event. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
java.util.Comparator |
comparator()
|
boolean |
containsKey(java.lang.Object key)
These methods need to thaw the map before performing the operation. |
boolean |
containsValue(java.lang.Object value)
|
java.util.Iterator |
eitherIterator()
Get an iterator regardless of whether the map is frozen. |
java.util.Set |
entrySet()
|
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
firstKey()
|
java.util.Iterator |
frozenIterator()
Get an iterator over the frozen elements of this map. |
java.lang.Object |
get(java.lang.Object key)
|
java.util.Collection |
getAddedKeys()
Returns the Collection of added keys |
java.util.Collection |
getAddedValues()
Returns the Collection of added values |
java.lang.String |
getFieldName()
Returns the field name |
java.lang.Class |
getKeyType()
Returns the type of the key assignment compatible with all keys of this map. |
java.lang.Object |
getOwner()
Returns the owner object of the SCO instance |
java.util.Collection |
getRemovedKeys()
Returns the Collection of removed keys |
java.util.Collection |
getRemovedValues()
Returns the Collection of removed values |
java.lang.Class |
getValueType()
Returns the type of the value assignment compatible with all values of this map. |
int |
hashCode()
|
java.util.SortedMap |
headMap(java.lang.Object toKey)
|
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
lastKey()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this map. |
void |
putAll(java.util.Map t)
Copies all of the mappings from the specified map to this one. |
void |
putAllInternal(java.util.Map t)
Copies all of the mappings from the specified map to this one without recording the event. |
void |
putInternal(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this map without recording the event. |
java.lang.Object |
remove(java.lang.Object key)
Removes the mapping for this key from this map if present. |
void |
removeInternal(java.lang.Object key)
Removes mappings from the Map without recording the event. |
void |
reset()
Resets removed and added lists after flush |
void |
setFrozen(java.util.Map.Entry[] entries)
Set the contents of this Map from the frozen elements. |
void |
setOwner(java.lang.Object owner,
int fieldNumber)
Sets the owner and field number. |
int |
size()
|
java.util.SortedMap |
subMap(java.lang.Object fromKey,
java.lang.Object toKey)
|
java.util.SortedMap |
tailMap(java.lang.Object fromKey)
|
java.lang.String |
toString()
|
void |
unsetOwner(java.lang.Object owner,
int fieldNumber)
Nullifies references to the owner Object iff the passed in owner and fieldNumber match. |
java.util.Collection |
values()
|
Methods inherited from class java.util.TreeMap |
---|
ceilingEntry, ceilingKey, descendingKeySet, descendingMap, firstEntry, floorEntry, floorKey, headMap, higherEntry, higherKey, lastEntry, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, subMap, tailMap |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TreeMap(java.lang.Class keyType, java.lang.Class valueType, boolean allowNulls)
TreeMap
object.
keyType
- the type of the keys allowed.valueType
- the type of the values allowed.allowNulls
- true if nulls are allowed.TreeMap
public TreeMap(java.lang.Class keyType, java.lang.Class valueType, boolean allowNulls, java.util.Comparator c)
TreeMap
object that has
the specified initial capacity.
keyType
- the type of the keys allowed.valueType
- the type of the values allowed.allowNulls
- true if nulls are allowedc
- the comparator that will be used to sort this map.
A null value indicates that the elements' natural ordering should
be used.TreeMap
Method Detail |
---|
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
put
in class java.util.TreeMap
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.
TreeMap
public void putAll(java.util.Map t)
putAll
in interface java.util.Map
putAll
in class java.util.TreeMap
t
- Mappings to be stored in this map.TreeMap
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
remove
in class java.util.TreeMap
key
- key whose mapping is to be removed from the map.
TreeMap
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
containsKey
in class java.util.TreeMap
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
containsValue
in class java.util.TreeMap
public java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in interface java.util.SortedMap
entrySet
in class java.util.TreeMap
public boolean equals(java.lang.Object o)
equals
in interface java.util.Map
equals
in class java.util.AbstractMap
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
get
in class java.util.TreeMap
public int hashCode()
hashCode
in interface java.util.Map
hashCode
in class java.util.AbstractMap
public boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in class java.util.AbstractMap
public java.util.Set keySet()
keySet
in interface java.util.Map
keySet
in interface java.util.SortedMap
keySet
in class java.util.TreeMap
public int size()
size
in interface java.util.Map
size
in class java.util.TreeMap
public java.util.Collection values()
values
in interface java.util.Map
values
in interface java.util.SortedMap
values
in class java.util.TreeMap
public java.lang.String toString()
toString
in class java.util.AbstractMap
public java.util.SortedMap subMap(java.lang.Object fromKey, java.lang.Object toKey)
subMap
in interface java.util.NavigableMap
subMap
in interface java.util.SortedMap
subMap
in class java.util.TreeMap
public java.util.SortedMap headMap(java.lang.Object toKey)
headMap
in interface java.util.NavigableMap
headMap
in interface java.util.SortedMap
headMap
in class java.util.TreeMap
public java.util.SortedMap tailMap(java.lang.Object fromKey)
tailMap
in interface java.util.NavigableMap
tailMap
in interface java.util.SortedMap
tailMap
in class java.util.TreeMap
public java.util.Comparator comparator()
comparator
in interface java.util.SortedMap
comparator
in class java.util.TreeMap
public java.lang.Object firstKey() throws java.util.NoSuchElementException
firstKey
in interface java.util.SortedMap
firstKey
in class java.util.TreeMap
java.util.NoSuchElementException
public java.lang.Object lastKey() throws java.util.NoSuchElementException
lastKey
in interface java.util.SortedMap
lastKey
in class java.util.TreeMap
java.util.NoSuchElementException
public void clear()
clear
in interface java.util.Map
clear
in class java.util.TreeMap
TreeMap
public java.lang.Object clone()
Mutable Second Class Objects are required to provide a public clone method in order to allow for copying PersistenceCapable objects. In contrast to Object.clone(), this method must not throw a CloneNotSupportedException.
clone
in interface SCO
clone
in class java.util.TreeMap
public void reset()
SCOMap
reset
in interface SCOMap
SCOMap.reset()
public void putInternal(java.lang.Object key, java.lang.Object value)
SCOMap
putInternal
in interface SCOMap
SCOMap.putInternal(Object key, Object value)
public void putAllInternal(java.util.Map t)
SCOMap
putAllInternal
in interface SCOMap
SCOMap.putAllInternal(Map t)
public java.util.Collection getAddedKeys()
SCOMap
getAddedKeys
in interface SCOMap
SCOMap.getAddedKeys()
public java.util.Collection getAddedValues()
SCOMap
getAddedValues
in interface SCOMap
SCOMap.getAddedValues()
public java.util.Collection getRemovedKeys()
SCOMap
getRemovedKeys
in interface SCOMap
SCOMap.getRemovedKeys()
public java.util.Collection getRemovedValues()
SCOMap
getRemovedValues
in interface SCOMap
SCOMap.getRemovedValues()
public void clearInternal()
SCOMap
clearInternal
in interface SCOMap
SCOMap.clearInternal()
public void removeInternal(java.lang.Object key)
SCOMap
removeInternal
in interface SCOMap
SCOMap.removeInternal(Object key)
public void unsetOwner(java.lang.Object owner, int fieldNumber)
SCO
unsetOwner
in interface SCO
owner
- the existing owner object.fieldNumber
- the existing number of the field.SCO.unsetOwner(Object owner, int fieldNumber)
public void setOwner(java.lang.Object owner, int fieldNumber)
SCO
setOwner
in interface SCO
owner
- the owner object.fieldNumber
- the number of the field associated with this instance.(Object owner, int fieldNumber)
public java.lang.Object getOwner()
SCO
getOwner
in interface SCO
SCO.getOwner()
public java.lang.String getFieldName()
SCO
getFieldName
in interface SCO
SCO.getFieldName()
public java.lang.Class getKeyType()
SCOMap
getKeyType
in interface SCOMap
{
public java.lang.Class getValueType()
SCOMap
getValueType
in interface SCOMap
{
public boolean allowNulls()
SCOMap
allowNulls
in interface SCOMap
{
public void setFrozen(java.util.Map.Entry[] entries)
setFrozen
in interface SCOMap
entries
- the frozen entries.public java.util.Iterator eitherIterator()
eitherIterator
in interface SCOMap
public java.util.Iterator frozenIterator()
frozenIterator
in interface SCOMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |