0.11.4
ca.uqac.lif.cep.util.Equals Class Reference

Detailed Description

A function that checks for the equality of various data types.

Author
Sylvain Hallé
Since
0.1

Definition at line 36 of file Equals.java.

Public Member Functions

Boolean getValue (Object x, Object y)
String toString ()
Public Member Functions inherited from ca.uqac.lif.cep.functions.BinaryFunction< T, V, U >
 BinaryFunction (Class< T > t, Class< V > v, Class< U > u)
 Creates a new instance of a binary function.
void evaluate (Object[] inputs, Object[] outputs, Context context, EventTracker tracker)
 Evaluates the outputs of the function, given some inputs.
abstract U getValue (T x, V y)
 Evaluates the function.
final int getInputArity ()
 Gets the function's input arity, i.e.
final int getOutputArity ()
 Gets the function's output arity, i.e.
getStartValue ()
 Gets a reasonable starting value if this function is used to create a CumulativeFunction.
void reset ()
 Resets the function to its initial state.
BinaryFunction< T, V, U > duplicate (boolean with_state)
 Duplicates an object.
final Class< T > getInputTypeLeft ()
final Class< V > getInputTypeRight ()
final void getInputTypesFor (Set< Class<?> > classes, int index)
 Populates the set of classes accepted by the function for its i-th input.
final Class< U > getOutputType ()
final Class<?> getOutputTypeFor (int index)
 Returns the type of the events produced by the function for its i-th output.
Public Member Functions inherited from ca.uqac.lif.cep.functions.Function
void evaluate (Object[] inputs, Object[] outputs, Context context)
 Evaluates the outputs of the function, given some inputs.
void evaluate (Object[] inputs, Object[] outputs)
 Evaluates the outputs of the function, given some inputs.
boolean evaluatePartial (Object[] inputs, Object[] outputs, Context context)
 Evaluates the outputs of the function, given some inputs.
boolean evaluateLazy (Object[] inputs, Object[] outputs)
 Attempts a lazy evaluation of the function, given some inputs.
final Function duplicate ()
 Duplicates an object and sets it to its initial state.
Object print (ObjectPrinter<?> printer)
final Function read (ObjectReader<?> reader, Object o) throws FunctionException
 Reads the content of a function from a serialized object.

Static Public Member Functions

static FunctionTree eq (Function f1, Function f2)
static boolean isEqualTo (Object x, Object y)
 Determines if two objects x and y are equal.

Static Public Attributes

static final transient Equals instance = new Equals()
Static Public Attributes inherited from ca.uqac.lif.cep.functions.Function
static final int s_maxInputArity = 10
 The maximum input arity that a function can have.

Protected Member Functions

 Equals ()
Protected Member Functions inherited from ca.uqac.lif.cep.functions.BinaryFunction< T, V, U >
void trackAssociations (T x, V y, U z, EventTracker tracker)
 Tracks the input/output associations for the evaluation of this function.
Protected Member Functions inherited from ca.uqac.lif.cep.functions.Function
Object printState ()
 Produces an object that represents the state of the current function.
Function readState (Object o)
 Reads the state of a function and uses it to create a new instance.

Constructor & Destructor Documentation

◆ Equals()

ca.uqac.lif.cep.util.Equals.Equals ( )
protected

Definition at line 45 of file Equals.java.

Member Function Documentation

◆ eq()

FunctionTree ca.uqac.lif.cep.util.Equals.eq ( Function f1,
Function f2 )
static

Definition at line 40 of file Equals.java.

◆ getValue()

Boolean ca.uqac.lif.cep.util.Equals.getValue ( Object x,
Object y )

Definition at line 51 of file Equals.java.

◆ isEqualTo()

boolean ca.uqac.lif.cep.util.Equals.isEqualTo ( Object x,
Object y )
static

Determines if two objects x and y are equal.

The method uses the following rules to determine equality:

  • null is equal to null, but not to any other value
  • Constant objects are compared according to the value they contain
  • MathLists and MathMaps are compared using their own method
  • Other collections are equal if they have the same size and the same elements
  • Strings and numbers are compared according to their value
  • Any other objects are compared by calling their equals(Object) method
Parameters
xThe first object
yThe second object
Returns
true if they are equal, false otherwise

Definition at line 81 of file Equals.java.

◆ toString()

String ca.uqac.lif.cep.util.Equals.toString ( )

Definition at line 57 of file Equals.java.

Member Data Documentation

◆ instance

final transient Equals ca.uqac.lif.cep.util.Equals.instance = new Equals()
static

Definition at line 38 of file Equals.java.


The documentation for this class was generated from the following file:
  • /home/sylvain/Workspaces/beepbeep/core/src/ca/uqac/lif/cep/util/Equals.java