|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.commons.util.map.AbstractIMap<K,V>
public abstract class AbstractIMap<K,V>
| Constructor Summary | |
|---|---|
protected |
AbstractIMap()
Constructs a new abstract immutable map with a NullDefault
as it's default. |
protected |
AbstractIMap(IMapDefault<K,V> def)
Constructs a new abstract immutable map with the specified default action. |
| Method Summary | |
|---|---|
boolean |
contains(Maplet<? extends K,? extends V> entry)
Returns true if this map contains the specified maplet. |
boolean |
containsAll(IMap<? extends K,? extends V> map)
Returns true if this map contains all the mappings in the
specified map. |
org.millscript.commons.alert.Alert |
decorate(org.millscript.commons.alert.Alert alert)
|
boolean |
equals(java.lang.Object obj)
Compares this map with the specified object for equality. |
IMapDefault<K,V> |
getDefault()
Returns the default used by the IMap.get(Object) method when there
is no mapping for a given key. |
int |
hashCode()
Returns the integer hash code for this map. |
boolean |
isEmtpy()
Returns true if this map has no mappings. |
IList<K> |
keyList(boolean share)
Returns a List of the keys in this map. |
IList<Maplet<K,V>> |
mapletList(boolean share)
Returns a List of the maplets in this map. |
void |
setDefault(IMapDefault<K,V> def)
Sets the default for this map. |
protected abstract IList<K> |
sharedKeyList()
|
protected abstract IList<Maplet<K,V>> |
sharedMapletList()
|
protected abstract IList<V> |
sharedValueList()
|
java.lang.String |
toString()
|
IList<V> |
valueList(boolean share)
Returns a List of the values in this map. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.millscript.commons.util.IMap |
|---|
contains, containsKey, containsValue, get, iterator, size |
| Constructor Detail |
|---|
protected AbstractIMap()
NullDefault
as it's default.
protected AbstractIMap(IMapDefault<K,V> def)
def - the default action for this map| Method Detail |
|---|
public boolean contains(Maplet<? extends K,? extends V> entry)
IMaptrue if this map contains the specified maplet.
contains in interface IMap<K,V>entry - the maplet whose presence to test
true if this map contains the specified mapletIMap.contains(org.millscript.commons.util.Maplet)public boolean containsAll(IMap<? extends K,? extends V> map)
IMaptrue if this map contains all the mappings in the
specified map.
containsAll in interface IMap<K,V>true if this map contains the specified mapletIMap.containsAll(org.millscript.commons.util.IMap)public org.millscript.commons.alert.Alert decorate(org.millscript.commons.alert.Alert alert)
decorate in interface org.millscript.commons.alert.AlertDecoratorAlertDecorator.decorate(org.millscript.commons.alert.Alert)public boolean equals(java.lang.Object obj)
IMap
equals in interface IMap<K,V>equals in class java.lang.Objectobj - the object to compare with this map for equality
true if this map and the specified object are
equal and false otherwiseIMap.equals(Object)public IMapDefault<K,V> getDefault()
IMapIMap.get(Object) method when there
is no mapping for a given key.
getDefault in interface IMap<K,V>IMap.getDefault()public int hashCode()
IMap
We require a simple sum of Maplet hash codes as different
IMap implementations may have different iteration orders. As a
result the hash code method must return the same hash code regardless of
iteration order.
hashCode in interface IMap<K,V>hashCode in class java.lang.ObjectIMap.hashCode()public boolean isEmtpy()
IMaptrue if this map has no mappings.
isEmtpy in interface IMap<K,V>true if this map contains no mappingsIMap.isEmtpy()public IList<K> keyList(boolean share)
IMap
keyList in interface IMap<K,V>share - if true this instances backing store should be
shared with the returned list, otherwise any backing store will be copied.
IMap.keyList(boolean)public IList<Maplet<K,V>> mapletList(boolean share)
IMap
mapletList in interface IMap<K,V>share - if true this instances backing store should be
shared with the returned list, otherwise any backing store will be copied.
IMap.mapletList(boolean)public void setDefault(IMapDefault<K,V> def)
IMap
setDefault in interface IMap<K,V>def - the new defaultIMap.setDefault(org.millscript.commons.util.IMapDefault)protected abstract IList<K> sharedKeyList()
protected abstract IList<Maplet<K,V>> sharedMapletList()
protected abstract IList<V> sharedValueList()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public IList<V> valueList(boolean share)
IMap
valueList in interface IMap<K,V>share - if true this instances backing store should be
shared with the returned list, otherwise any backing store will be copied.
IMap.valueList(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||