Class ImmutableResidueTorsionAngles

java.lang.Object
pl.poznan.put.pdb.analysis.ResidueTorsionAngles
pl.poznan.put.pdb.analysis.ImmutableResidueTorsionAngles

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

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

  • Method Details

    • identifier

      public PdbResidueIdentifier identifier()
      Specified by:
      identifier in class ResidueTorsionAngles
      Returns:
      The residue identifier.
    • values

      protected List<TorsionAngleValue> values()
      Specified by:
      values in class ResidueTorsionAngles
      Returns:
      The list of torsion angles' values.
    • withIdentifier

      public final ImmutableResidueTorsionAngles withIdentifier(PdbResidueIdentifier value)
      Copy the current immutable object by setting a value for the identifier attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for identifier
      Returns:
      A modified copy of the this object
    • withValues

      public final ImmutableResidueTorsionAngles withValues(TorsionAngleValue... elements)
      Copy the current immutable object with elements that replace the content of values.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withValues

      public final ImmutableResidueTorsionAngles withValues(Iterable<? extends TorsionAngleValue> elements)
      Copy the current immutable object with elements that replace the content of values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of values 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 ImmutableResidueTorsionAngles 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: identifier, values.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ResidueTorsionAngles with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      Construct a new immutable ResidueTorsionAngles instance.
      Parameters:
      identifier - The value for the identifier attribute
      values - The value for the values attribute
      Returns:
      An immutable ResidueTorsionAngles instance
    • of

      public static ImmutableResidueTorsionAngles of(PdbResidueIdentifier identifier, Iterable<? extends TorsionAngleValue> values)
      Construct a new immutable ResidueTorsionAngles instance.
      Parameters:
      identifier - The value for the identifier attribute
      values - The value for the values attribute
      Returns:
      An immutable ResidueTorsionAngles instance
    • copyOf

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

      public static ImmutableResidueTorsionAngles.Builder builder()
      Creates a builder for ImmutableResidueTorsionAngles.
       ImmutableResidueTorsionAngles.builder()
          .identifier(pl.poznan.put.pdb.PdbResidueIdentifier) // required identifier
          .addValues|addAllValues(pl.poznan.put.torsion.TorsionAngleValue) // values elements
          .build();
       
      Returns:
      A new ImmutableResidueTorsionAngles builder