rcf.core.util.reference
Class FilteredReference<T>
java.lang.Object
rcf.core.util.groups.Singleton<T>
rcf.core.util.reference.StrongReference<T>
rcf.core.util.reference.FilteredReference<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- ImmutableSingletonInterface<T>, SingletonInterface<T>, Reference<T>
@Revision(value="$Revision: 1.4 $",
date="$Date: 2006/11/09 02:09:51 $",
tag="$Name: $")
public class FilteredReference<T>- extends StrongReference<T>
TODO: Javadoc
Note that the reference can be null whether or not the filter will accept null.
This can be used in conjunction with e.g. FilterTypeFilter to create a
reference which will only hold non-empty collections, and which will free it's referent when it becomes empty.
TODO: Unit tests, Code review, Javadoc review, Seal/Finalize
TODO: Dynamic filter handling & dynamic referants (optional)
- Version:
- $Revision: 1.4 $
- Author:
- Greg Gibeling
|
Field Summary |
protected rcf.core.util.filter.Filter<T> |
filter
TODO: Javadoc |
| Fields inherited from class rcf.core.util.groups.Singleton |
a |
|
Constructor Summary |
FilteredReference(T referent,
rcf.core.util.filter.Filter<T> _filter)
TODO: Javadoc |
|
Method Summary |
boolean |
equals(Object o)
|
T |
get()
TODO: Javadoc
Get the content element of this singleton. |
int |
hashCode()
|
T |
set(T _a)
TODO: Javadoc
Set the content element of this singleton. |
protected void |
test()
TODO: Javadoc |
String |
toString()
|
filter
protected final rcf.core.util.filter.Filter<T> filter
- TODO: Javadoc
FilteredReference
public FilteredReference(T referent,
rcf.core.util.filter.Filter<T> _filter)
- TODO: Javadoc
- Parameters:
referent - _filter -
test
protected void test()
- TODO: Javadoc
equals
public boolean equals(Object o)
- Overrides:
equals in class Singleton<T>
get
public T get()
- Description copied from interface:
ImmutableSingletonInterface
- TODO: Javadoc
Get the content element of this singleton.
- Specified by:
get in interface ImmutableSingletonInterface<T>- Overrides:
get in class Singleton<T>
- Returns:
- The content element of this singleton.
hashCode
public int hashCode()
- Overrides:
hashCode in class Singleton<T>
set
public T set(T _a)
- Description copied from interface:
SingletonInterface
- TODO: Javadoc
Set the content element of this singleton.
- Specified by:
set in interface SingletonInterface<T>- Overrides:
set in class Singleton<T>
- Parameters:
_a - The new content element of this singleton.
- Returns:
- The old content element of this singleton.
toString
public String toString()
- Overrides:
toString in class Singleton<T>