org.apache.jackrabbit.core.state
Interface ItemStateStore

All Known Implementing Classes:
ItemStateMap, ItemStateReferenceMap

public interface ItemStateStore

ItemStateStore is similar to a typed Map:

An ItemStateStore temporarily stores and retrieves ItemState instances using their ItemIds as key.


Method Summary
 void clear()
          Removes all entries from this store.
 boolean contains(ItemId id)
          Returns true if this store contains an ItemState object with the specified id.
 ItemState get(ItemId id)
          Returns the ItemState object with the specified id if it is present or null if no entry exists with that id.
 boolean isEmpty()
          Returns true if this store contains no entries.
 Set<ItemId> keySet()
          Returns an unmodifiable set view of the keys (i.e.
 void put(ItemState state)
          Stores the specified ItemState object in the store using its ItemId as the key.
 void remove(ItemId id)
          Removes the ItemState object with the specified id from this store if it is present.
 int size()
          Returns the number of entries in this store.
 Collection<ItemState> values()
          Returns an unmodifiable collection view of the values (i.e.
 

Method Detail

contains

boolean contains(ItemId id)
Returns true if this store contains an ItemState object with the specified id.

Parameters:
id - id of ItemState object whose presence should be tested.
Returns:
true if this store contains a corresponding entry, otherwise false.

get

ItemState get(ItemId id)
Returns the ItemState object with the specified id if it is present or null if no entry exists with that id.

Parameters:
id - the id of the ItemState object to be returned.
Returns:
the ItemState object with the specified id or or null if no entry exists with that id

put

void put(ItemState state)
Stores the specified ItemState object in the store using its ItemId as the key.

Parameters:
state - the ItemState object to store

remove

void remove(ItemId id)
Removes the ItemState object with the specified id from this store if it is present.

Parameters:
id - the id of the ItemState object which should be removed from this store.

clear

void clear()
Removes all entries from this store.


isEmpty

boolean isEmpty()
Returns true if this store contains no entries.

Returns:
true if this store contains no entries.

size

int size()
Returns the number of entries in this store.

Returns:
number of entries in this store.

keySet

Set<ItemId> keySet()
Returns an unmodifiable set view of the keys (i.e. ItemId objects) contained in this store.

Returns:
a set view of the keys contained in this store.

values

Collection<ItemState> values()
Returns an unmodifiable collection view of the values (i.e. ItemState objects) contained in this store.

Returns:
a collection view of the values contained in this store.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.