Package pl.poznan.put.structure.formats
Class ImmutableExtendedEntry
java.lang.Object
pl.poznan.put.structure.formats.Ct.ExtendedEntry
pl.poznan.put.structure.formats.ImmutableExtendedEntry
- All Implemented Interfaces:
Comparable<Ct.ExtendedEntry>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableExtendedEntry
extends Ct.ExtendedEntry
Immutable implementation of
Ct.ExtendedEntry
.
Use the builder to create immutable instances:
ImmutableExtendedEntry.builder()
.
Use the static factory method to create immutable instances:
ImmutableExtendedEntry.of()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableExtendedEntry
. -
Method Summary
Modifier and TypeMethodDescriptionint
after()
int
before()
builder()
Creates a builder forImmutableExtendedEntry
.comment()
static ImmutableExtendedEntry
copyOf
(Ct.ExtendedEntry instance) Creates an immutable copy of aCt.ExtendedEntry
value.boolean
This instance is equal to all instances ofImmutableExtendedEntry
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:index
,seq
,before
,after
,pair
,original
,comment
.int
index()
static ImmutableExtendedEntry
of
(int index, char seq, int before, int after, int pair, int original) Construct a new immutableExtendedEntry
instance.int
original()
int
pair()
char
seq()
final ImmutableExtendedEntry
withAfter
(int value) Copy the current immutable object by setting a value for theafter
attribute.final ImmutableExtendedEntry
withBefore
(int value) Copy the current immutable object by setting a value for thebefore
attribute.final ImmutableExtendedEntry
withComment
(String value) Copy the current immutable object by setting a value for thecomment
attribute.final ImmutableExtendedEntry
withIndex
(int value) Copy the current immutable object by setting a value for theindex
attribute.final ImmutableExtendedEntry
withOriginal
(int value) Copy the current immutable object by setting a value for theoriginal
attribute.final ImmutableExtendedEntry
withPair
(int value) Copy the current immutable object by setting a value for thepair
attribute.final ImmutableExtendedEntry
withSeq
(char value) Copy the current immutable object by setting a value for theseq
attribute.Methods inherited from class pl.poznan.put.structure.formats.Ct.ExtendedEntry
compareTo, fromEntry, fromString, hasInvalidBeforeOrAfter, isPaired, toString
-
Method Details
-
index
public int index()- Specified by:
index
in classCt.ExtendedEntry
- Returns:
- The value of `index` column.
-
seq
public char seq()- Specified by:
seq
in classCt.ExtendedEntry
- Returns:
- The value of `seq` column.
-
before
public int before()- Specified by:
before
in classCt.ExtendedEntry
- Returns:
- The value of `before` column.
-
after
public int after()- Specified by:
after
in classCt.ExtendedEntry
- Returns:
- The value of `after` column.
-
pair
public int pair()- Specified by:
pair
in classCt.ExtendedEntry
- Returns:
- The value of `pair` column.
-
original
public int original()- Specified by:
original
in classCt.ExtendedEntry
- Returns:
- The value of `original` column.
-
comment
- Overrides:
comment
in classCt.ExtendedEntry
- Returns:
- An optional comment.
-
withIndex
Copy the current immutable object by setting a value for theindex
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for index- Returns:
- A modified copy of the
this
object
-
withSeq
Copy the current immutable object by setting a value for theseq
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for seq- Returns:
- A modified copy of the
this
object
-
withBefore
Copy the current immutable object by setting a value for thebefore
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for before- Returns:
- A modified copy of the
this
object
-
withAfter
Copy the current immutable object by setting a value for theafter
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for after- Returns:
- A modified copy of the
this
object
-
withPair
Copy the current immutable object by setting a value for thepair
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for pair- Returns:
- A modified copy of the
this
object
-
withOriginal
Copy the current immutable object by setting a value for theoriginal
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for original- Returns:
- A modified copy of the
this
object
-
withComment
Copy the current immutable object by setting a value for thecomment
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for comment- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableExtendedEntry
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:index
,seq
,before
,after
,pair
,original
,comment
. -
of
public static ImmutableExtendedEntry of(int index, char seq, int before, int after, int pair, int original) Construct a new immutableExtendedEntry
instance.- Parameters:
index
- The value for theindex
attributeseq
- The value for theseq
attributebefore
- The value for thebefore
attributeafter
- The value for theafter
attributepair
- The value for thepair
attributeoriginal
- The value for theoriginal
attribute- Returns:
- An immutable ExtendedEntry instance
-
copyOf
Creates an immutable copy of aCt.ExtendedEntry
value. 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 ExtendedEntry instance
-
builder
Creates a builder forImmutableExtendedEntry
.ImmutableExtendedEntry.builder() .index(int) // required
index
.seq(char) // requiredseq
.before(int) // requiredbefore
.after(int) // requiredafter
.pair(int) // requiredpair
.original(int) // requiredoriginal
.comment(String) // optionalcomment
.build();- Returns:
- A new ImmutableExtendedEntry builder
-