Package hydra.typeScript.syntax
Class ModuleItemWithComments
- java.lang.Object
-
- hydra.typeScript.syntax.ModuleItemWithComments
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ModuleItemWithComments>
public class ModuleItemWithComments extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<ModuleItemWithComments>
A module item with optional documentation- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModuleItemWithComments.BuilderA fluent builder forModuleItemWithComments.
-
Field Summary
Fields Modifier and Type Field Description ModuleItembodyThe module itemstatic NameBODYName of thehydra.typeScript.syntax.ModuleItemWithComments.bodyfield.Optional<DocumentationComment>commentsOptional documentation commentstatic NameCOMMENTSName of thehydra.typeScript.syntax.ModuleItemWithComments.commentsfield.static NameTYPE_Name of thehydra.typeScript.syntax.ModuleItemWithCommentstype.
-
Constructor Summary
Constructors Constructor Description ModuleItemWithComments(ModuleItem body, Optional<DocumentationComment> comments)Constructs an immutableModuleItemWithComments.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ModuleItemWithComments.Builderbuilder()Creates a new fluent builder forModuleItemWithComments.intcompareTo(ModuleItemWithComments other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()ModuleItemWithCommentswithBody(ModuleItem body)Returns a copy of thisModuleItemWithCommentswithbodyreplaced.ModuleItemWithCommentswithComments(Optional<DocumentationComment> comments)Returns a copy of thisModuleItemWithCommentswithcommentsreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.typeScript.syntax.ModuleItemWithCommentstype.
-
BODY
public static final Name BODY
Name of thehydra.typeScript.syntax.ModuleItemWithComments.bodyfield.
-
COMMENTS
public static final Name COMMENTS
Name of thehydra.typeScript.syntax.ModuleItemWithComments.commentsfield.
-
body
public final ModuleItem body
The module item
-
comments
public final Optional<DocumentationComment> comments
Optional documentation comment
-
-
Constructor Detail
-
ModuleItemWithComments
public ModuleItemWithComments(ModuleItem body, Optional<DocumentationComment> comments)
Constructs an immutableModuleItemWithComments.- Parameters:
body- The module itemcomments- Optional documentation comment
-
-
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(ModuleItemWithComments other)
- Specified by:
compareToin interfacejava.lang.Comparable<ModuleItemWithComments>
-
withBody
public ModuleItemWithComments withBody(ModuleItem body)
Returns a copy of thisModuleItemWithCommentswithbodyreplaced.
-
withComments
public ModuleItemWithComments withComments(Optional<DocumentationComment> comments)
Returns a copy of thisModuleItemWithCommentswithcommentsreplaced.
-
builder
public static ModuleItemWithComments.Builder builder()
Creates a new fluent builder forModuleItemWithComments.
-
-