|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.molae.pipe.binop.AbstractBinaryFunction<S,S,T>
net.sf.molae.pipe.binop.SymmetricBinaryFunction<S,T>
public abstract class SymmetricBinaryFunction<S,T>
Skeleton implementation of BinaryFunction for symmetric
functions.
| Constructor Summary | |
|---|---|
SymmetricBinaryFunction(String name,
boolean associative,
S identityElement,
S sink)
Constructs a new SymmetricBinaryFunction. |
|
| Method Summary | |
|---|---|
S |
getIdentityElement()
Returns the identity element of this function. |
S |
getSink()
Returns the sink of this function. |
protected boolean |
isAnIdentityElement(Object obj)
Tests if the specified element is the identity element of this function. |
protected boolean |
isASink(Object obj)
Tests if the specified element is the sink of this function. |
| Methods inherited from class net.sf.molae.pipe.binop.AbstractBinaryFunction |
|---|
compute, getFirstInverse, getPermuted, isAssociative, isLeftSink, isRightIdentityElement, setFirstInverse, setPermuted, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SymmetricBinaryFunction(String name,
boolean associative,
S identityElement,
S sink)
name - the result of the AbstractBinaryFunction.toString() methodassociative - this value is returned by theidentityElement - the identity element of this function
null if no such element exists or is not known.sink - the sink of this function
null if no such element exists or is not known.
AbstractBinaryFunction.isAssociative() method.| Method Detail |
|---|
public S getIdentityElement()
a where compute is defined:
a.equals(compute(getIdentityElement(), a)) and
a.equals(compute(a, getIdentityElement())).
null if no such element exists or is not known.
UnsupportedOperationException - if not implementedpublic S getSink()
a where compute is defined:
getSink().equals(compute(getSink(), a)) and
getSink().equals(compute(a, getSink())).
null if no such element exists or is not known.protected final boolean isAnIdentityElement(Object obj)
isAnIdentityElement in class AbstractBinaryFunction<S,S,T>obj - the candidate for identity element
true if the specified object is the identity
element of this function.protected final boolean isASink(Object obj)
isASink in class AbstractBinaryFunction<S,S,T>obj - the candidate for sink
true if the specified object is the sink
of this function.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||