org.sourceforge.jemm.client.id
Interface TrackedIDFactory

All Known Implementing Classes:
TrackedIDFactoryImpl

public interface TrackedIDFactory

A Factory which produces TrackedID flyweights.

Author:
Paul Keeble
See Also:
TrackedIDFactoryImpl

Method Summary
 void addListener(TrackedIDListener listener)
          Adds a listener which receives notification if a trackedID is enqueued for garbage collection.
 boolean contains(ID id)
          Returns true if there is a TrackedID for that ID, false otherwise.
 TrackedID create(ID id)
          Determines if a TrackedID already exists and if so uses it, otherwise creates a new TrackedID and maps that weakly and returns the value.
 TrackedID get(ID id)
          Gets a TrackedID if it exists, otherwise returns null.
 void remove(ID id)
          Removes a mapping for an ID and the associated TrackedID.
 void removeListener(TrackedIDListener listener)
          Removes the listener
 

Method Detail

create

TrackedID create(ID id)
Determines if a TrackedID already exists and if so uses it, otherwise creates a new TrackedID and maps that weakly and returns the value.

Parameters:
id - The id to look up
Returns:
The TrackedID associated with the ID

contains

boolean contains(ID id)
Returns true if there is a TrackedID for that ID, false otherwise.

Parameters:
id - The ID to lookup
Returns:
True if the TrackedID is present, false otherwise.

get

TrackedID get(ID id)
Gets a TrackedID if it exists, otherwise returns null.

Parameters:
id - The ID to find.
Returns:
The TrackedID or null if not found

remove

void remove(ID id)
Removes a mapping for an ID and the associated TrackedID.

Parameters:
id -

addListener

void addListener(TrackedIDListener listener)
Adds a listener which receives notification if a trackedID is enqueued for garbage collection.

Parameters:
listener -

removeListener

void removeListener(TrackedIDListener listener)
Removes the listener

Parameters:
listener -


Copyright © 2009. All Rights Reserved.