|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.rwth.domains.templates.IdentityFunction
Implements functions which always return their argument.
| Inner classes inherited from class de.rwth.domains.Function |
Function.Tools |
| Field Summary | |
protected Set |
set
The domain and range of the function. |
| Constructor Summary | |
IdentityFunction(Set set)
Creates a new IdentityFunction instance. |
|
| Method Summary | |
java.lang.Object |
apply(java.lang.Object x)
Returns the argument if it is an element of the domain. |
Set |
getDomain()
Returns the domain of this function. |
Set |
getRange()
Returns the range (co-domain) of this function. |
java.lang.String |
toString()
Returns "id". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Set set
| Constructor Detail |
public IdentityFunction(Set set)
IdentityFunction instance.set - a Set value| Method Detail |
public Set getDomain()
FunctiongetDomain in interface Functionde.rwth.domains.FunctionSetpublic Set getRange()
FunctiongetRange in interface Functionde.rwth.domains.FunctionSet
public java.lang.Object apply(java.lang.Object x)
throws FunctionException
apply in interface Functionx - an Object valueObject valueFunctionException - if the argument is not an element of the domain.public java.lang.String toString()
toString in class java.lang.ObjectString value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||