|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y25.base.LayeredGraph.LayerEdgeMapImpl
An Implementation of the LayerEdgeMap
interface based on a
HashMap
.
Field Summary | |
protected HashMap |
map
The HashMap that is used to store key/value pairs. |
Constructor Summary | |
LayeredGraph.LayerEdgeMapImpl()
|
Method Summary | |
Object |
get(Object layerEdge)
Returns the value bound to the given layer edge. |
boolean |
getBool(Object layerEdge)
Returns the boolean value bound to the given layer edge. |
double |
getDouble(Object layerEdge)
Returns the double value bound to the given layer edge. |
int |
getInt(Object layerEdge)
Returns the integer value bound to the given layer edge. |
Object |
remove(Object layerEdge)
Removes the value stored for the given layer edge, if present. |
void |
set(Object layerEdge,
Object value)
Associates the given value to the given layer edge. |
void |
setBool(Object layerEdge,
boolean value)
Associates the given boolean value to the given layer edge. |
void |
setDouble(Object layerEdge,
double value)
Associates the given double value to the given layer edge. |
void |
setInt(Object layerEdge,
int value)
Associates the given integer value to the given layer edge. |
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.
Constructor Detail |
public LayeredGraph.LayerEdgeMapImpl()
Method Detail |
public Object remove(Object layerEdge)
LayerEdgeMap
null
if there was no mapping for that layer edge. A
null
return can also mean that the map previously
associated null
with the given layer edge.
remove
in interface LayerEdgeMap
public Object get(Object layerEdge)
LayerEdgeMap
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 LayerEdgeMap
public void set(Object layerEdge, Object value)
LayerEdgeMap
set
in interface LayerEdgeMap
public boolean getBool(Object layerEdge)
LayerEdgeMap
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 LayerEdgeMap
public double getDouble(Object layerEdge)
LayerEdgeMap
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 LayerEdgeMap
public int getInt(Object layerEdge)
LayerEdgeMap
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 LayerEdgeMap
public void setBool(Object layerEdge, boolean value)
LayerEdgeMap
setBool
in interface LayerEdgeMap
public void setDouble(Object layerEdge, double value)
LayerEdgeMap
setDouble
in interface LayerEdgeMap
public void setInt(Object layerEdge, int value)
LayerEdgeMap
setInt
in interface LayerEdgeMap
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |