Class LinkedMap.MapEntry
java.lang.Object
org.pentaho.reporting.libraries.base.util.LinkedMap.MapEntry
- All Implemented Interfaces:
Serializable
- Enclosing class:
- LinkedMap
A cache map entry class holding both the key and value and acting as member of a linked list.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected LinkedMap.MapEntry
The link to the next entry in the bucket that has the same hashkey.protected final int
The precomputed hashkey of the key.protected final Object
The key object, which is never null and which never changes.protected LinkedMap.MapEntry
The link to the next entry in the list.protected LinkedMap.MapEntry
The link to the previous entry in the list.protected Object
The current value object (can be null). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the next map-entry in the bucket.getNext()
Returns the next entry in the list or null if this is the last entry.Returns the previous entry in the list or null if this is the first entry.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
Redefines the current value.
-
Field Details
-
hashKey
protected final int hashKeyThe precomputed hashkey of the key. -
key
The key object, which is never null and which never changes. -
value
The current value object (can be null). -
previous
The link to the previous entry in the list. -
next
The link to the next entry in the list. -
collisionNext
The link to the next entry in the bucket that has the same hashkey.
-
-
Constructor Details
-
MapEntry
Creates a new map-entry for the given key and value.- Parameters:
key
- the key, never null.hashKey
- the precomputed hashkey for the key.value
- the value, never null.
-
-
Method Details
-
getPrevious
Returns the previous entry in the list or null if this is the first entry.- Returns:
- the previous entry.
-
setPrevious
Redefines the previous entry in the list or null if this is the first entry.- Parameters:
previous
- the previous entry.
-
getNext
Returns the next entry in the list or null if this is the last entry.- Returns:
- the next entry.
-
setNext
Redefines the next entry in the list or null if this is the last entry.- Parameters:
next
- the next entry.
-
getValue
Returns the current value.- Returns:
- the value, never null.
-
setValue
Redefines the current value.- Parameters:
value
- the value, never null.
-
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
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.
-