Package hydra.haskell.syntax
Class InfixType
- java.lang.Object
-
- hydra.haskell.syntax.InfixType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<InfixType>
public class InfixType extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<InfixType>
An infix type application- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInfixType.BuilderA fluent builder forInfixType.
-
Field Summary
Fields Modifier and Type Field Description TypelhsThe left-hand typestatic NameLHSName of thehydra.haskell.syntax.InfixType.lhsfield.OperatoroperatorThe type operatorstatic NameOPERATORName of thehydra.haskell.syntax.InfixType.operatorfield.TyperhsThe right-hand typestatic NameRHSName of thehydra.haskell.syntax.InfixType.rhsfield.static NameTYPE_Name of thehydra.haskell.syntax.InfixTypetype.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InfixType.Builderbuilder()Creates a new fluent builder forInfixType.intcompareTo(InfixType other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()InfixTypewithLhs(Type lhs)Returns a copy of thisInfixTypewithlhsreplaced.InfixTypewithOperator(Operator operator)Returns a copy of thisInfixTypewithoperatorreplaced.InfixTypewithRhs(Type rhs)Returns a copy of thisInfixTypewithrhsreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.haskell.syntax.InfixTypetype.
-
LHS
public static final Name LHS
Name of thehydra.haskell.syntax.InfixType.lhsfield.
-
OPERATOR
public static final Name OPERATOR
Name of thehydra.haskell.syntax.InfixType.operatorfield.
-
RHS
public static final Name RHS
Name of thehydra.haskell.syntax.InfixType.rhsfield.
-
lhs
public final Type lhs
The left-hand type
-
operator
public final Operator operator
The type operator
-
rhs
public final Type rhs
The right-hand type
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(InfixType other)
- Specified by:
compareToin interfacejava.lang.Comparable<InfixType>
-
withOperator
public InfixType withOperator(Operator operator)
Returns a copy of thisInfixTypewithoperatorreplaced.
-
builder
public static InfixType.Builder builder()
Creates a new fluent builder forInfixType.
-
-