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 ofCt.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 Classes Modifier and Type Class Description static classImmutableExtendedEntry.BuilderBuilds instances of typeImmutableExtendedEntry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intafter()intbefore()static ImmutableExtendedEntry.Builderbuilder()Creates a builder forImmutableExtendedEntry.Stringcomment()static ImmutableExtendedEntrycopyOf(Ct.ExtendedEntry instance)Creates an immutable copy of aCt.ExtendedEntryvalue.booleanequals(Object another)This 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()ImmutableExtendedEntrywithAfter(int value)Copy the current immutable object by setting a value for theafterattribute.ImmutableExtendedEntrywithBefore(int value)Copy the current immutable object by setting a value for thebeforeattribute.ImmutableExtendedEntrywithComment(String value)Copy the current immutable object by setting a value for thecommentattribute.ImmutableExtendedEntrywithIndex(int value)Copy the current immutable object by setting a value for theindexattribute.ImmutableExtendedEntrywithOriginal(int value)Copy the current immutable object by setting a value for theoriginalattribute.ImmutableExtendedEntrywithPair(int value)Copy the current immutable object by setting a value for thepairattribute.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, fromDotBracketSymbol, fromEntry, fromEntryAndPdbResidue, fromString, isPaired, toString
-
-
-
-
Method Detail
-
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
public String comment()
- Overrides:
commentin classCt.ExtendedEntry- Returns:
- An optional comment.
-
withIndex
public final ImmutableExtendedEntry withIndex(int value)
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
public final ImmutableExtendedEntry withSeq(char value)
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
public final ImmutableExtendedEntry withBefore(int value)
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
public final ImmutableExtendedEntry withAfter(int value)
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
public final ImmutableExtendedEntry withPair(int value)
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
public final ImmutableExtendedEntry withOriginal(int value)
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
public final ImmutableExtendedEntry withComment(String value)
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
public boolean equals(@Nullable Object another)
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
public static ImmutableExtendedEntry copyOf(Ct.ExtendedEntry instance)
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
public static ImmutableExtendedEntry.Builder 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
-
-