Class ContractLongCondition

    • Method Detail

      • withPredicate

        public final ContractLongCondition withPredicate​(LongPredicate value)
        Copy the current immutable object by setting a value for the predicate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for predicate
        Returns:
        A modified copy of the this object
      • withDescriber

        public final ContractLongCondition withDescriber​(LongFunction<String> value)
        Copy the current immutable object by setting a value for the describer attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for describer
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(Object another)
        This instance is equal to all instances of ContractLongCondition 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: predicate, describer.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ContractLongCondition of​(LongPredicate predicate,
                                               LongFunction<String> describer)
        Construct a new immutable ContractLongCondition instance.
        Parameters:
        predicate - The value for the predicate attribute
        describer - The value for the describer attribute
        Returns:
        An immutable ContractLongCondition instance
      • copyOf

        public static ContractLongCondition copyOf​(ContractLongConditionType instance)
        Creates an immutable copy of a ContractLongConditionType 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 ContractLongCondition instance