Class SlicedModel.SliceMetadata

java.lang.Object
org.springframework.hateoas.SlicedModel.SliceMetadata
Enclosing class:
SlicedModel<T>

public static class SlicedModel.SliceMetadata extends Object
Value object for slice metadata.
Author:
Michael Schout
  • Constructor Details

    • SliceMetadata

      protected SliceMetadata()
    • SliceMetadata

      public SliceMetadata(long size, long number)
      Creates a new SlicedModel.SliceMetadata from the given size, and slice number.
      Parameters:
      size - must be greater or equal to zero.
      number - zero-indexed slice number, greater or equal to zero.
  • Method Details

    • getSize

      public long getSize()
      Returns the requested size of the slice.
      Returns:
      the size a positive long.
    • getNumber

      public long getNumber()
      Returns the number of the current slice.
      Returns:
      the number a positive long.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object