kodkod.ast
Class IntExprCast

java.lang.Object
  extended by kodkod.ast.Expression
      extended by kodkod.ast.IntExprCast
All Implemented Interfaces:
Node

public final class IntExprCast
extends Expression

Represents the conversion from an int expression to an expression. The meaning of the resulting expression is a singleton set containing the atom that represents the integer given by the wrapped int expression.

Author:
Emina Torlak
invariant:
children = intExpr
arity = 1
specfield:
intExpr: IntExpression

Field Summary
 
Fields inherited from class kodkod.ast.Expression
IDEN, INTS, NONE, UNIV
 
Method Summary
<E,F,D,I> E
accept(ReturnVisitor<E,F,D,I> visitor)
          Accepts the given visitor and returns the result.
 void accept(VoidVisitor visitor)
          Accepts the given void visitor by calling visitor.visit(this).
 int arity()
          Returns 1.
 boolean equals(java.lang.Object o)
          Returns true if o is an IntExprCast whose intExpr is logically equal to this.intExpr.
 int hashCode()
          
 IntExpression intExpr()
          Returns this.intExpr.
 java.lang.String toString()
          
 
Methods inherited from class kodkod.ast.Expression
apply, apply, apply, closure, compose, compose, count, difference, eq, in, intersection, join, lone, no, one, override, product, reflexiveClosure, some, sum, transpose, union
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

arity

public int arity()
Returns 1.

Specified by:
arity in class Expression
Returns:
1

intExpr

public IntExpression intExpr()
Returns this.intExpr.

Returns:
this.intExpr

accept

public <E,F,D,I> E accept(ReturnVisitor<E,F,D,I> visitor)
Accepts the given visitor and returns the result.

Specified by:
accept in interface Node
Specified by:
accept in class Expression
Returns:
the result of being visited by the given visitor
See Also:
Expression.accept(kodkod.ast.visitor.ReturnVisitor)

accept

public void accept(VoidVisitor visitor)
Accepts the given void visitor by calling visitor.visit(this).

See Also:
Node.accept(kodkod.ast.visitor.VoidVisitor)

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object o)
Returns true if o is an IntExprCast whose intExpr is logically equal to this.intExpr.

Overrides:
equals in class java.lang.Object
Returns:
o in IntExprCast && o.intExpr.equals(this.intExpr)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()