Class MappingOpConstant

java.lang.Object
se.liu.ida.hefquin.mappings.algebra.ops.MappingOpConstant
All Implemented Interfaces:
MappingOperator

public class MappingOpConstant extends Object implements MappingOperator
This operator simply returns the tuples given to its constructor.
  • Field Details

  • Constructor Details

  • Method Details

    • getMappingRelation

      public MappingRelation getMappingRelation()
    • getExpectedNumberOfSubExpressions

      public int getExpectedNumberOfSubExpressions()
      Description copied from interface: MappingOperator
      Returns the number of sub-expressions that a mapping expression is expected to have if it has this operator as its root operator. Hence, for nullary operators, this method returns 0; for unary operators, it returns 1; for binary operators, it returns 2. For n-ary operators (which can be applied to an arbitrary number of sub-expressions), this method returns Integer.MAX_VALUE.
      Specified by:
      getExpectedNumberOfSubExpressions in interface MappingOperator
    • visit

      public void visit(MappingOperatorVisitor visitor)
      Specified by:
      visit in interface MappingOperator
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object