de.rwth.domains
Class Function.Tools

java.lang.Object
  |
  +--de.rwth.domains.Function.Tools
Enclosing class:
Function

public static class Function.Tools
extends java.lang.Object

Contains implementations of useful tools for functions.


Constructor Summary
Function.Tools()
           
 
Method Summary
static boolean equals(Function f, java.lang.Object o)
          The method equals checks if a function and an object are equal.
static java.lang.String toString(Function f)
          Creates a String representation of a function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Function.Tools

public Function.Tools()
Method Detail

toString

public static java.lang.String toString(Function f)
Creates a String representation of a function. For each argument/value combination, it calls the toString methods of domain and range and concatenates them with "->". All thes are concatenated with ", " and surrounded this with "{"..."}".
Parameters:
f - a Function value
Returns:
the String representing this function.

equals

public static boolean equals(Function f,
                             java.lang.Object o)
The method equals checks if a function and an object are equal. It does that by checking:
  1. if neither is null
  2. if the object is a function
  3. with same domain and range as the function
  4. and with same function result for all arguments
Parameters:
f - a Function value
o - a value of type Object
Returns:
true iff o is equal to this function