Class CEnumValue.Builder
- java.lang.Object
-
- net.morimekta.providence.PEnumBuilder<CEnumValue>
-
- net.morimekta.providence.reflect.contained.CEnumValue.Builder
-
- Enclosing class:
- CEnumValue
public static class CEnumValue.Builder extends PEnumBuilder<CEnumValue>
-
-
Constructor Summary
Constructors Constructor Description Builder(CEnumDescriptor type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CEnumValue
build()
CEnumValue.Builder
setById(int id)
Set the enum entity from integer value as it was defined in the thrift IDL.CEnumValue.Builder
setByName(java.lang.String name)
Set the enum entity from name as it was written in the thrift IDL.boolean
valid()
Check if the enum builder has been given a valid value.
-
-
-
Constructor Detail
-
Builder
public Builder(CEnumDescriptor type)
-
-
Method Detail
-
build
public CEnumValue build()
- Specified by:
build
in classPEnumBuilder<CEnumValue>
-
valid
public boolean valid()
Description copied from class:PEnumBuilder
Check if the enum builder has been given a valid value.- Specified by:
valid
in classPEnumBuilder<CEnumValue>
- Returns:
- True if valid.
-
setById
@Nonnull public CEnumValue.Builder setById(int id)
Description copied from class:PEnumBuilder
Set the enum entity from integer value as it was defined in the thrift IDL.- Specified by:
setById
in classPEnumBuilder<CEnumValue>
- Parameters:
id
- The value to match.- Returns:
- The builder.
-
setByName
@Nonnull public CEnumValue.Builder setByName(java.lang.String name)
Description copied from class:PEnumBuilder
Set the enum entity from name as it was written in the thrift IDL.- Specified by:
setByName
in classPEnumBuilder<CEnumValue>
- Parameters:
name
- The name to match.- Returns:
- The builder.
-
-