org.apache.ode.utils.stl
Class MemberOfFunction<E>

java.lang.Object
  extended by org.apache.ode.utils.stl.MemberOfFunction<E>
All Implemented Interfaces:
UnaryFunction<E,java.lang.Boolean>, UnaryFunctionEx<E,java.lang.Boolean>
Direct Known Subclasses:
EqualsUnaryFunction, MemberOfFunction.InstanceOf

public abstract class MemberOfFunction<E>
extends java.lang.Object
implements UnaryFunction<E,java.lang.Boolean>

Interface used for defining object filters/selectors, classes that are used to determine whether a given object belong in a set.

Created on Feb 4, 2004 at 4:48:55 PM.


Nested Class Summary
static class MemberOfFunction.InstanceOf
           
 
Constructor Summary
MemberOfFunction()
           
 
Method Summary
 java.lang.Boolean apply(E x)
          Implementation of UnaryFunction method defering to #isMember(E).
abstract  boolean isMember(E o)
          A unary function that tests whether an element is the member of a set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemberOfFunction

public MemberOfFunction()
Method Detail

isMember

public abstract boolean isMember(E o)
A unary function that tests whether an element is the member of a set.

Parameters:
o - element to test
Returns:
true if element is a member

apply

public final java.lang.Boolean apply(E x)
Implementation of UnaryFunction method defering to #isMember(E).

Specified by:
apply in interface UnaryFunction<E,java.lang.Boolean>
Specified by:
apply in interface UnaryFunctionEx<E,java.lang.Boolean>
Parameters:
x - element to test
Returns:
Boolean.TRUE if isMemeber returns true, false otherwise