Class ImmutableWindowBound.Preceding

java.lang.Object
io.substrait.expression.WindowBound.Preceding
io.substrait.expression.ImmutableWindowBound.Preceding
All Implemented Interfaces:
WindowBound
Enclosing class:
ImmutableWindowBound

public static final class ImmutableWindowBound.Preceding extends WindowBound.Preceding
Immutable implementation of WindowBound.Preceding.

Use the builder to create immutable instances: ImmutableWindowBound.Preceding.builder().

  • Method Details

    • offset

      public long offset()
      Specified by:
      offset in class WindowBound.Preceding
      Returns:
      The value of the offset attribute
    • withOffset

      public final ImmutableWindowBound.Preceding withOffset(long value)
      Copy the current immutable object by setting a value for the offset attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for offset
      Returns:
      A modified copy or the this object
    • equals

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

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

      public static ImmutableWindowBound.Preceding copyOf(WindowBound.Preceding instance)
      Creates an immutable copy of a WindowBound.Preceding 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 Preceding instance
    • builder

      public static ImmutableWindowBound.Preceding.Builder builder()
      Creates a builder for Preceding.
       ImmutableWindowBound.Preceding.builder()
          .offset(long) // required offset
          .build();
       
      Returns:
      A new Preceding builder