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 classBuilds instances of typeImmutableExtendedEntry. -
Method Summary
Modifier and TypeMethodDescriptionintafter()intbefore()builder()Creates a builder forImmutableExtendedEntry.comment()static ImmutableExtendedEntrycopyOf(Ct.ExtendedEntry instance) Creates an immutable copy of aCt.ExtendedEntryvalue.booleanThis instance is equal to all instances ofImmutableExtendedEntrythat have equal attribute values.inthashCode()Computes a hash code from attributes:index,seq,before,after,pair,original,comment.intindex()static ImmutableExtendedEntryof(int index, char seq, int before, int after, int pair, int original) Construct a new immutableExtendedEntryinstance.intoriginal()intpair()charseq()final ImmutableExtendedEntrywithAfter(int value) Copy the current immutable object by setting a value for theafterattribute.final ImmutableExtendedEntrywithBefore(int value) Copy the current immutable object by setting a value for thebeforeattribute.final ImmutableExtendedEntrywithComment(String value) Copy the current immutable object by setting a value for thecommentattribute.final ImmutableExtendedEntrywithIndex(int value) Copy the current immutable object by setting a value for theindexattribute.final ImmutableExtendedEntrywithOriginal(int value) Copy the current immutable object by setting a value for theoriginalattribute.final ImmutableExtendedEntrywithPair(int value) Copy the current immutable object by setting a value for thepairattribute.final ImmutableExtendedEntrywithSeq(char value) Copy the current immutable object by setting a value for theseqattribute.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:
indexin classCt.ExtendedEntry- Returns:
- The value of `index` column.
-
seq
public char seq()- Specified by:
seqin classCt.ExtendedEntry- Returns:
- The value of `seq` column.
-
before
public int before()- Specified by:
beforein classCt.ExtendedEntry- Returns:
- The value of `before` column.
-
after
public int after()- Specified by:
afterin classCt.ExtendedEntry- Returns:
- The value of `after` column.
-
pair
public int pair()- Specified by:
pairin classCt.ExtendedEntry- Returns:
- The value of `pair` column.
-
original
public int original()- Specified by:
originalin classCt.ExtendedEntry- Returns:
- The value of `original` column.
-
comment
- Overrides:
commentin classCt.ExtendedEntry- Returns:
- An optional comment.
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. 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
thisobject
-
withSeq
Copy the current immutable object by setting a value for theseqattribute. 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
thisobject
-
withBefore
Copy the current immutable object by setting a value for thebeforeattribute. 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
thisobject
-
withAfter
Copy the current immutable object by setting a value for theafterattribute. 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
thisobject
-
withPair
Copy the current immutable object by setting a value for thepairattribute. 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
thisobject
-
withOriginal
Copy the current immutable object by setting a value for theoriginalattribute. 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
thisobject
-
withComment
Copy the current immutable object by setting a value for thecommentattribute. 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
thisobject
-
equals
This instance is equal to all instances ofImmutableExtendedEntrythat 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 immutableExtendedEntryinstance.- Parameters:
index- The value for theindexattributeseq- The value for theseqattributebefore- The value for thebeforeattributeafter- The value for theafterattributepair- The value for thepairattributeoriginal- The value for theoriginalattribute- Returns:
- An immutable ExtendedEntry instance
-
copyOf
Creates an immutable copy of aCt.ExtendedEntryvalue. 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) // requiredindex.seq(char) // requiredseq.before(int) // requiredbefore.after(int) // requiredafter.pair(int) // requiredpair.original(int) // requiredoriginal.comment(String) // optionalcomment.build();- Returns:
- A new ImmutableExtendedEntry builder
-