Class SizeInfo<T>

java.lang.Object
software.coley.treemap.squaring.SizeInfo<T>

public class SizeInfo<T> extends Object
Wrapper of the original value, along with its computed 'size' and a variant normalized to the size of the canvas.
Author:
Matt Coley
See Also:
  • Constructor Details

    • SizeInfo

      public SizeInfo(@Nonnull T value, double size, @Nonnull DoubleSupplier occupiedSpaceRatio)
      Creates a new size info wrapper of a value and its size.
      Parameters:
      value - Wrapped data value.
      size - Original size of the value.
      occupiedSpaceRatio - Supplies the ratio of space occupied by all values (Passed to the SizeInfoProcessor) to the total size of the canvas.
  • Method Details

    • normalize

      public void normalize()
      Normalizes the value size to the proportion of the canvas.
    • getSize

      public double getSize()
      Returns:
      Original size of the wrapped value.
    • getNormalizedSize

      public double getNormalizedSize()
      Returns:
      Normalized size of the wrapped value.
    • getValue

      @Nonnull public T getValue()
      Returns:
      Wrapped data value.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object