Package hydra.python.syntax
Class WithStatement
- java.lang.Object
-
- hydra.python.syntax.WithStatement
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<WithStatement>
public class WithStatement extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<WithStatement>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWithStatement.BuilderA fluent builder forWithStatement.
-
Field Summary
Fields Modifier and Type Field Description java.lang.Booleanasyncstatic NameASYNCName of thehydra.python.syntax.WithStatement.asyncfield.Blockbodystatic NameBODYName of thehydra.python.syntax.WithStatement.bodyfield.java.util.List<WithItem>itemsstatic NameITEMSName of thehydra.python.syntax.WithStatement.itemsfield.static NameTYPE_Name of thehydra.python.syntax.WithStatementtype.static NameTYPE_COMMENTName of thehydra.python.syntax.WithStatement.typeCommentfield.Optional<TypeComment>typeComment
-
Constructor Summary
Constructors Constructor Description WithStatement(java.lang.Boolean async, java.util.List<WithItem> items, Optional<TypeComment> typeComment, Block body)Constructs an immutableWithStatement.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WithStatement.Builderbuilder()Creates a new fluent builder forWithStatement.intcompareTo(WithStatement other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()WithStatementwithAsync(java.lang.Boolean async)Returns a copy of thisWithStatementwithasyncreplaced.WithStatementwithBody(Block body)Returns a copy of thisWithStatementwithbodyreplaced.WithStatementwithItems(java.util.List<WithItem> items)Returns a copy of thisWithStatementwithitemsreplaced.WithStatementwithTypeComment(Optional<TypeComment> typeComment)Returns a copy of thisWithStatementwithtypeCommentreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.python.syntax.WithStatementtype.
-
ASYNC
public static final Name ASYNC
Name of thehydra.python.syntax.WithStatement.asyncfield.
-
ITEMS
public static final Name ITEMS
Name of thehydra.python.syntax.WithStatement.itemsfield.
-
TYPE_COMMENT
public static final Name TYPE_COMMENT
Name of thehydra.python.syntax.WithStatement.typeCommentfield.
-
BODY
public static final Name BODY
Name of thehydra.python.syntax.WithStatement.bodyfield.
-
async
public final java.lang.Boolean async
-
items
public final java.util.List<WithItem> items
-
typeComment
public final Optional<TypeComment> typeComment
-
body
public final Block body
-
-
Constructor Detail
-
WithStatement
public WithStatement(java.lang.Boolean async, java.util.List<WithItem> items, Optional<TypeComment> typeComment, Block body)Constructs an immutableWithStatement.
-
-
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(WithStatement other)
- Specified by:
compareToin interfacejava.lang.Comparable<WithStatement>
-
withAsync
public WithStatement withAsync(java.lang.Boolean async)
Returns a copy of thisWithStatementwithasyncreplaced.
-
withItems
public WithStatement withItems(java.util.List<WithItem> items)
Returns a copy of thisWithStatementwithitemsreplaced.
-
withTypeComment
public WithStatement withTypeComment(Optional<TypeComment> typeComment)
Returns a copy of thisWithStatementwithtypeCommentreplaced.
-
withBody
public WithStatement withBody(Block body)
Returns a copy of thisWithStatementwithbodyreplaced.
-
builder
public static WithStatement.Builder builder()
Creates a new fluent builder forWithStatement.
-
-