Package hydra.python.syntax
Class Listcomp
- java.lang.Object
-
- hydra.python.syntax.Listcomp
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Listcomp>
public class Listcomp extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<Listcomp>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classListcomp.BuilderA fluent builder forListcomp.
-
Field Summary
Fields Modifier and Type Field Description NamedExpressionexpressionstatic NameEXPRESSIONName of thehydra.python.syntax.Listcomp.expressionfield.static NameFOR_IF_CLAUSESName of thehydra.python.syntax.Listcomp.forIfClausesfield.ForIfClausesforIfClausesstatic NameTYPE_Name of thehydra.python.syntax.Listcomptype.
-
Constructor Summary
Constructors Constructor Description Listcomp(NamedExpression expression, ForIfClauses forIfClauses)Constructs an immutableListcomp.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Listcomp.Builderbuilder()Creates a new fluent builder forListcomp.intcompareTo(Listcomp other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()ListcompwithExpression(NamedExpression expression)Returns a copy of thisListcompwithexpressionreplaced.ListcompwithForIfClauses(ForIfClauses forIfClauses)Returns a copy of thisListcompwithforIfClausesreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.python.syntax.Listcomptype.
-
EXPRESSION
public static final Name EXPRESSION
Name of thehydra.python.syntax.Listcomp.expressionfield.
-
FOR_IF_CLAUSES
public static final Name FOR_IF_CLAUSES
Name of thehydra.python.syntax.Listcomp.forIfClausesfield.
-
expression
public final NamedExpression expression
-
forIfClauses
public final ForIfClauses forIfClauses
-
-
Constructor Detail
-
Listcomp
public Listcomp(NamedExpression expression, ForIfClauses forIfClauses)
Constructs an immutableListcomp.
-
-
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(Listcomp other)
- Specified by:
compareToin interfacejava.lang.Comparable<Listcomp>
-
withExpression
public Listcomp withExpression(NamedExpression expression)
Returns a copy of thisListcompwithexpressionreplaced.
-
withForIfClauses
public Listcomp withForIfClauses(ForIfClauses forIfClauses)
Returns a copy of thisListcompwithforIfClausesreplaced.
-
builder
public static Listcomp.Builder builder()
Creates a new fluent builder forListcomp.
-
-