Class ImmutableCt

  • All Implemented Interfaces:
    Serializable

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

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

    See Also:
    Serialized Form
    • Method Detail

      • withEntries

        public final ImmutableCt withEntries​(Ct.ExtendedEntry... 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 ImmutableCt withEntries​(Iterable<? extends Ct.ExtendedEntry> 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 ImmutableCt 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 ImmutableCt of​(SortedSet<Ct.ExtendedEntry> entries)
        Construct a new immutable Ct instance.
        Parameters:
        entries - The value for the entries attribute
        Returns:
        An immutable Ct instance
      • of

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

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

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