Class ImmutableBpSeq

java.lang.Object
pl.poznan.put.structure.formats.BpSeq
pl.poznan.put.structure.formats.ImmutableBpSeq
All Implemented Interfaces:
Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableBpSeq extends BpSeq
Immutable implementation of BpSeq.

Use the builder to create immutable instances: ImmutableBpSeq.builder(). Use the static factory method to create immutable instances: ImmutableBpSeq.of().

See Also:
  • Method Details

    • entries

      public SortedSet<BpSeq.Entry> entries()
      Specified by:
      entries in class BpSeq
      Returns:
      The list of BPSEQ entries.
    • withEntries

      public final ImmutableBpSeq withEntries(BpSeq.Entry... elements)
      Copy the current immutable object with elements that replace the content of entries.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withEntries

      public final ImmutableBpSeq withEntries(Iterable<? extends BpSeq.Entry> elements)
      Copy the current immutable object with elements that replace the content of entries. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of entries elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableBpSeq that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: entries.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • of

      public static ImmutableBpSeq of(SortedSet<BpSeq.Entry> entries)
      Construct a new immutable BpSeq instance.
      Parameters:
      entries - The value for the entries attribute
      Returns:
      An immutable BpSeq instance
    • of

      public static ImmutableBpSeq of(Iterable<? extends BpSeq.Entry> entries)
      Construct a new immutable BpSeq instance.
      Parameters:
      entries - The value for the entries attribute
      Returns:
      An immutable BpSeq instance
    • copyOf

      public static ImmutableBpSeq copyOf(BpSeq instance)
      Creates an immutable copy of a BpSeq 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 BpSeq instance
    • builder

      public static ImmutableBpSeq.Builder builder()
      Creates a builder for ImmutableBpSeq.
       ImmutableBpSeq.builder()
          .addEntries|addAllEntries(pl.poznan.put.structure.formats.BpSeq.Entry) // entries elements
          .build();
       
      Returns:
      A new ImmutableBpSeq builder