Interface IBodyCache
public interface IBodyCache
Represents a cache of element handle/body relationships.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the corresponding body for the given element, ornull
if this cache contains no body for the element.Returns the corresponding body for the given element without disturbing cache ordering, ornull
if this cache contains no body for the element.void
Remembers the given body for the given element in this cache.default void
Remembers the given element handle/body relationships in this cache.void
Removes the corresponding body for the given element from this cache.
-
Method Details
-
get
Returns the corresponding body for the given element, ornull
if this cache contains no body for the element.- Parameters:
element
- the element whose body is to be returned- Returns:
- the corresponding body for the given element, or
null
if the cache contains no body for the element
-
peek
Returns the corresponding body for the given element without disturbing cache ordering, ornull
if this cache contains no body for the element.- Parameters:
element
- the element whose body is to be returned- Returns:
- the corresponding body for the given element, or
null
if the cache contains no body for the element
-
put
Remembers the given body for the given element in this cache. If the cache previously contained a body for the element, the old body is replaced with the given body.- Parameters:
element
- the element with which the given body is to be associated (notnull
)body
- the body to be associated with the given element (notnull
)
-
putAll
Remembers the given element handle/body relationships in this cache.- Parameters:
elementBodies
- element handle/body relationships to be stored in the cache (notnull
)
-
remove
Removes the corresponding body for the given element from this cache. Does nothing if the cache contains no body for the element.- Parameters:
element
- the element whose body is to be removed from the cache
-