Class ImmutableEncodedElement.TypeParam.Builder
- java.lang.Object
-
- org.immutables.value.processor.encode.ImmutableEncodedElement.TypeParam.Builder
-
- Direct Known Subclasses:
EncodedElement.TypeParam.Builder
- Enclosing class:
- ImmutableEncodedElement.TypeParam
@NotThreadSafe public static class ImmutableEncodedElement.TypeParam.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableList.Builder<Type.Defined>boundsprivate static longINIT_BIT_NAMEprivate longinitBitsprivate java.lang.Stringname
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EncodedElement.TypeParam.BuilderaddAllBounds(java.lang.Iterable<? extends Type.Defined> elements)Adds elements toboundslist.EncodedElement.TypeParam.BuilderaddBounds(Type.Defined element)Adds one element toboundslist.EncodedElement.TypeParam.BuilderaddBounds(Type.Defined... elements)Adds elements toboundslist.EncodedElement.TypeParambuild()Builds a newTypeParam.private static voidcheckNotIsSet(boolean isSet, java.lang.String name)private voidcheckRequiredAttributes()private java.lang.StringformatRequiredAttributesMessage()EncodedElement.TypeParam.Buildername(java.lang.String name)Initializes the value for thenameattribute.private booleannameIsSet()
-
-
-
Field Detail
-
INIT_BIT_NAME
private static final long INIT_BIT_NAME
- See Also:
- Constant Field Values
-
initBits
private long initBits
-
name
@Nullable private java.lang.String name
-
bounds
private final com.google.common.collect.ImmutableList.Builder<Type.Defined> bounds
-
-
Method Detail
-
name
public final EncodedElement.TypeParam.Builder name(java.lang.String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
addBounds
public final EncodedElement.TypeParam.Builder addBounds(Type.Defined element)
Adds one element toboundslist.- Parameters:
element- A bounds element- Returns:
thisbuilder for use in a chained invocation
-
addBounds
public final EncodedElement.TypeParam.Builder addBounds(Type.Defined... elements)
Adds elements toboundslist.- Parameters:
elements- An array of bounds elements- Returns:
thisbuilder for use in a chained invocation
-
addAllBounds
public final EncodedElement.TypeParam.Builder addAllBounds(java.lang.Iterable<? extends Type.Defined> elements)
Adds elements toboundslist.- Parameters:
elements- An iterable of bounds elements- Returns:
thisbuilder for use in a chained invocation
-
build
public EncodedElement.TypeParam build()
Builds a newTypeParam.- Returns:
- An immutable instance of TypeParam
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
nameIsSet
private boolean nameIsSet()
-
checkNotIsSet
private static void checkNotIsSet(boolean isSet, java.lang.String name)
-
checkRequiredAttributes
private void checkRequiredAttributes()
-
formatRequiredAttributesMessage
private java.lang.String formatRequiredAttributesMessage()
-
-