|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y25.base.LayeredGraph.GraphMapImpl
An Implementation of the GraphMap
interface based on a
HashMap
.
Field Summary | |
protected HashMap |
map
The HashMap that is used to store key/value pairs. |
Method Summary | |
Object |
get(Object key)
Returns the value bound to the given graph. |
boolean |
getBool(Object graph)
Returns the boolean value bound to the given graph. |
double |
getDouble(Object graph)
Returns the double value bound to the given graph. |
int |
getInt(Object graph)
Returns the integer value bound to the given graph. |
Object |
remove(Object graph)
Removes the value stored for the given graph, if present. |
void |
set(Object key,
Object value)
Associates the given value to the given graph. |
void |
setBool(Object graph,
boolean value)
Associates the given boolean value to the given graph. |
void |
setDouble(Object graph,
double value)
Associates the given double value to the given graph. |
void |
setInt(Object graph,
int value)
Associates the given integer value to the given graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected HashMap map
HashMap
that is used to store key/value pairs.
Method Detail |
public Object remove(Object graph)
GraphMap
null
if
there was no mapping for that graph. A null
return can
also mean that the map previously associated null
with the
given graph.
remove
in interface GraphMap
public void set(Object key, Object value)
GraphMap
set
in interface GraphMap
public Object get(Object key)
GraphMap
set
.
Returns null
if the map contains no mapping for this key.
A return value of null
does not necessarily indicate that
the map contains no mapping for the key; it is also possible that the map
explicitly maps the key to null
.
get
in interface GraphMap
public boolean getBool(Object graph)
GraphMap
setBool
.
Returns false
if the map contains no mapping for this key.
A return value of false
does not necessarily indicate that
the map contains no mapping for the key; it is also possible that the map
explicitly maps the key to false
.
getBool
in interface GraphMap
public double getDouble(Object graph)
GraphMap
setDouble
.
Returns 0.0
if the map contains no mapping for this key. A
return value of 0.0
does not necessarily indicate that the
map contains no mapping for the key; it is also possible that the map
explicitly maps the key to 0.0
.
getDouble
in interface GraphMap
public int getInt(Object graph)
GraphMap
setInt
.
Returns 0
if the map contains no mapping for this key. A
return value of 0
does not necessarily indicate that the
map contains no mapping for the key; it is also possible that the map
explicitly maps the key to 0
.
getInt
in interface GraphMap
public void setBool(Object graph, boolean value)
GraphMap
setBool
in interface GraphMap
public void setDouble(Object graph, double value)
GraphMap
setDouble
in interface GraphMap
public void setInt(Object graph, int value)
GraphMap
setInt
in interface GraphMap
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |