Package hydra.haskell.syntax
Class ApplicationPattern
- java.lang.Object
-
- hydra.haskell.syntax.ApplicationPattern
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ApplicationPattern>
public class ApplicationPattern extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<ApplicationPattern>
An application pattern- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApplicationPattern.BuilderA fluent builder forApplicationPattern.
-
Field Summary
Fields Modifier and Type Field Description java.util.List<Pattern>argsThe pattern argumentsstatic NameARGSName of thehydra.haskell.syntax.ApplicationPattern.argsfield.NamenameThe constructor namestatic NameNAMEName of thehydra.haskell.syntax.ApplicationPattern.namefield.static NameTYPE_Name of thehydra.haskell.syntax.ApplicationPatterntype.
-
Constructor Summary
Constructors Constructor Description ApplicationPattern(Name name, java.util.List<Pattern> args)Constructs an immutableApplicationPattern.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApplicationPattern.Builderbuilder()Creates a new fluent builder forApplicationPattern.intcompareTo(ApplicationPattern other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()ApplicationPatternwithArgs(java.util.List<Pattern> args)Returns a copy of thisApplicationPatternwithargsreplaced.ApplicationPatternwithName(Name name)Returns a copy of thisApplicationPatternwithnamereplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.haskell.syntax.ApplicationPatterntype.
-
NAME
public static final Name NAME
Name of thehydra.haskell.syntax.ApplicationPattern.namefield.
-
ARGS
public static final Name ARGS
Name of thehydra.haskell.syntax.ApplicationPattern.argsfield.
-
name
public final Name name
The constructor name
-
args
public final java.util.List<Pattern> args
The pattern arguments
-
-
Constructor Detail
-
ApplicationPattern
public ApplicationPattern(Name name, java.util.List<Pattern> args)
Constructs an immutableApplicationPattern.- Parameters:
name- The constructor nameargs- The pattern arguments
-
-
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(ApplicationPattern other)
- Specified by:
compareToin interfacejava.lang.Comparable<ApplicationPattern>
-
withName
public ApplicationPattern withName(Name name)
Returns a copy of thisApplicationPatternwithnamereplaced.
-
withArgs
public ApplicationPattern withArgs(java.util.List<Pattern> args)
Returns a copy of thisApplicationPatternwithargsreplaced.
-
builder
public static ApplicationPattern.Builder builder()
Creates a new fluent builder forApplicationPattern.
-
-