Package hydra.python.syntax
Class FunctionDefinition
- java.lang.Object
-
- hydra.python.syntax.FunctionDefinition
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<FunctionDefinition>
public class FunctionDefinition extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<FunctionDefinition>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFunctionDefinition.BuilderA fluent builder forFunctionDefinition.
-
Field Summary
Fields Modifier and Type Field Description Optional<Decorators>decoratorsstatic NameDECORATORSName of thehydra.python.syntax.FunctionDefinition.decoratorsfield.FunctionDefRawrawstatic NameRAWName of thehydra.python.syntax.FunctionDefinition.rawfield.static NameTYPE_Name of thehydra.python.syntax.FunctionDefinitiontype.
-
Constructor Summary
Constructors Constructor Description FunctionDefinition(Optional<Decorators> decorators, FunctionDefRaw raw)Constructs an immutableFunctionDefinition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FunctionDefinition.Builderbuilder()Creates a new fluent builder forFunctionDefinition.intcompareTo(FunctionDefinition other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()FunctionDefinitionwithDecorators(Optional<Decorators> decorators)Returns a copy of thisFunctionDefinitionwithdecoratorsreplaced.FunctionDefinitionwithRaw(FunctionDefRaw raw)Returns a copy of thisFunctionDefinitionwithrawreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.python.syntax.FunctionDefinitiontype.
-
DECORATORS
public static final Name DECORATORS
Name of thehydra.python.syntax.FunctionDefinition.decoratorsfield.
-
RAW
public static final Name RAW
Name of thehydra.python.syntax.FunctionDefinition.rawfield.
-
decorators
public final Optional<Decorators> decorators
-
raw
public final FunctionDefRaw raw
-
-
Constructor Detail
-
FunctionDefinition
public FunctionDefinition(Optional<Decorators> decorators, FunctionDefRaw raw)
Constructs an immutableFunctionDefinition.
-
-
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(FunctionDefinition other)
- Specified by:
compareToin interfacejava.lang.Comparable<FunctionDefinition>
-
withDecorators
public FunctionDefinition withDecorators(Optional<Decorators> decorators)
Returns a copy of thisFunctionDefinitionwithdecoratorsreplaced.
-
withRaw
public FunctionDefinition withRaw(FunctionDefRaw raw)
Returns a copy of thisFunctionDefinitionwithrawreplaced.
-
builder
public static FunctionDefinition.Builder builder()
Creates a new fluent builder forFunctionDefinition.
-
-