Package software.coley.treemap.squaring
Class SizeInfo<T>
java.lang.Object
software.coley.treemap.squaring.SizeInfo<T>
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 Summary
ConstructorsConstructorDescriptionSizeInfo(T value, double size, DoubleSupplier occupiedSpaceRatio) Creates a new size info wrapper of a value and its size. -
Method Summary
-
Constructor Details
-
SizeInfo
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 theSizeInfoProcessor) 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
- Returns:
- Wrapped data value.
-
equals
-
hashCode
public int hashCode()
-