|
|||||||||
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
valueMethod Detail |
public Set getDomain()
Function
getDomain
in interface Function
de.rwth.domains.Function
Set
public Set getRange()
Function
getRange
in interface Function
de.rwth.domains.Function
Set
public java.lang.Object apply(java.lang.Object x) throws FunctionException
apply
in interface Function
x
- an Object
valueObject
valueFunctionException
- if the argument is not an element of the domain.public java.lang.String toString()
toString
in class java.lang.Object
String
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |