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