Orbital library

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

Nested Class Summary
static class MutableFunction.TableFunction
          A mutable function implemented as a tabular HashMap.
 
Nested classes/interfaces inherited from interface orbital.logic.functor.Function
Function.Composite
 
Nested classes/interfaces inherited from interface orbital.logic.functor.Functor
Functor.Specification
 
Field Summary
 
Fields inherited from interface orbital.logic.functor.Function
callTypeDeclaration
 
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
 
Methods inherited from interface orbital.logic.functor.Functor
equals, hashCode, toString
 

Method Detail

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

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.