Package com.arakelian.faker.reader
Class ImmutableColumn
- java.lang.Object
-
- com.arakelian.faker.reader.ImmutableColumn
-
- All Implemented Interfaces:
TextReader.Column
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableColumn extends java.lang.Object implements TextReader.ColumnImmutable implementation ofTextReader.Column.Use the builder to create immutable instances:
ImmutableColumn.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableColumn.BuilderBuilds instances of typeImmutableColumn.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableColumn.Builderbuilder()Creates a builder forImmutableColumn.static ImmutableColumncopyOf(TextReader.Column instance)Creates an immutable copy of aTextReader.Columnvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableColumnthat have equal attribute values.intgetLength()java.lang.StringgetName()TextReader.TypegetType()inthashCode()Computes a hash code from attributes:length,name,type.java.lang.StringtoString()Prints the immutable valueColumnwith attribute values.ImmutableColumnwithLength(int value)Copy the current immutable object by setting a value for thelengthattribute.ImmutableColumnwithName(java.lang.String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableColumnwithType(TextReader.Type value)Copy the current immutable object by setting a value for thetypeattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.arakelian.faker.reader.TextReader.Column
validate
-
-
-
-
Method Detail
-
getLength
public int getLength()
- Specified by:
getLengthin interfaceTextReader.Column- Returns:
- The value of the
lengthattribute
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceTextReader.Column- Returns:
- The value of the
nameattribute
-
getType
public TextReader.Type getType()
- Specified by:
getTypein interfaceTextReader.Column- Returns:
- The value of the
typeattribute
-
withLength
public final ImmutableColumn withLength(int value)
Copy the current immutable object by setting a value for thelengthattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for length- Returns:
- A modified copy of the
thisobject
-
withName
public final ImmutableColumn withName(java.lang.String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableColumn withType(TextReader.Type value)
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableColumnthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:length,name,type.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueColumnwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableColumn copyOf(TextReader.Column instance)
Creates an immutable copy of aTextReader.Columnvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Column instance
-
builder
public static ImmutableColumn.Builder builder()
Creates a builder forImmutableColumn.ImmutableColumn.builder() .length(int) // optionallength.name(String) // requiredname.type(com.arakelian.faker.reader.TextReader.Type) // optionaltype.build();- Returns:
- A new ImmutableColumn builder
-
-