Class LinkedMap.MapEntry
- java.lang.Object
-
- org.pentaho.reporting.libraries.base.util.LinkedMap.MapEntry
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- LinkedMap
protected static final class LinkedMap.MapEntry extends Object implements Serializable
A cache map entry class holding both the key and value and acting as member of a linked list.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkedMap.MapEntry
collisionNext
The link to the next entry in the bucket that has the same hashkey.protected int
hashKey
The precomputed hashkey of the key.protected Object
key
The key object, which is never null and which never changes.protected LinkedMap.MapEntry
next
The link to the next entry in the list.protected LinkedMap.MapEntry
previous
The link to the previous entry in the list.protected Object
value
The current value object (can be null).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkedMap.MapEntry
getCollisionNext()
Returns the next map-entry in the bucket.LinkedMap.MapEntry
getNext()
Returns the next entry in the list or null if this is the last entry.LinkedMap.MapEntry
getPrevious()
Returns the previous entry in the list or null if this is the first entry.Object
getValue()
Returns the current value.void
setCollisionNext(LinkedMap.MapEntry collisionNext)
Defines the next map-entry in the bucket.void
setNext(LinkedMap.MapEntry next)
Redefines the next entry in the list or null if this is the last entry.void
setPrevious(LinkedMap.MapEntry previous)
Redefines the previous entry in the list or null if this is the first entry.void
setValue(Object value)
Redefines the current value.
-
-
-
Field Detail
-
hashKey
protected final int hashKey
The precomputed hashkey of the key.
-
key
protected final Object key
The key object, which is never null and which never changes.
-
value
protected Object value
The current value object (can be null).
-
previous
protected LinkedMap.MapEntry previous
The link to the previous entry in the list.
-
next
protected LinkedMap.MapEntry next
The link to the next entry in the list.
-
collisionNext
protected LinkedMap.MapEntry collisionNext
The link to the next entry in the bucket that has the same hashkey.
-
-
Method Detail
-
getPrevious
public LinkedMap.MapEntry getPrevious()
Returns the previous entry in the list or null if this is the first entry.- Returns:
- the previous entry.
-
setPrevious
public void setPrevious(LinkedMap.MapEntry previous)
Redefines the previous entry in the list or null if this is the first entry.- Parameters:
previous
- the previous entry.
-
getNext
public LinkedMap.MapEntry getNext()
Returns the next entry in the list or null if this is the last entry.- Returns:
- the next entry.
-
setNext
public void setNext(LinkedMap.MapEntry next)
Redefines the next entry in the list or null if this is the last entry.- Parameters:
next
- the next entry.
-
getValue
public Object getValue()
Returns the current value.- Returns:
- the value, never null.
-
setValue
public void setValue(Object value)
Redefines the current value.- Parameters:
value
- the value, never null.
-
getCollisionNext
public LinkedMap.MapEntry getCollisionNext()
Returns the next map-entry in the bucket. If more than one object maps into the same hash-bucket, this map stores the entries as linked list.- Returns:
- the next entry.
-
setCollisionNext
public void setCollisionNext(LinkedMap.MapEntry collisionNext)
Defines the next map-entry in the bucket. If more than one object maps into the same hash-bucket, this map stores the entries as linked list.- Parameters:
collisionNext
- the next entry.
-
-