orbital.logic.functor
Interface MutableFunction
- All Superinterfaces:
- Function, Functor
- All Known Implementing Classes:
- MutableFunction.TableFunction
public interface MutableFunction
- extends Function
A mutable function that can change its values.
A mutable function is a function that can be modified by assigning new values
to it at some arguments.
Note: this class might be subject to change in a redesign.
- Author:
- André Platzer
Method Summary |
java.lang.Object |
clone()
|
java.lang.Object |
set(java.lang.Object arg,
java.lang.Object value)
Set f(arg) := value. |
Methods inherited from interface orbital.logic.functor.Function |
apply |
set
java.lang.Object set(java.lang.Object arg,
java.lang.Object value)
- Set f(arg) := value.
Modifies a function by assigning a new value to the function at a specified argument.
- Parameters:
arg
- the argument for which to change the function.value
- the new value this function should have for argument arg, from now on.
- Returns:
- the old value f(arg) prior to updating the function.
- Postconditions:
- RES == OLD(apply(arg)) && apply(arg) == value
clone
java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Throws:
java.lang.CloneNotSupportedException
- if this function does not support cloning.- Postconditions:
- RES != RES
Copyright © 1996-2009 André Platzer
All Rights Reserved.