Package com.iizix
Class DSize
java.lang.Object
com.iizix.DSize
- All Implemented Interfaces:
- Serializable,- Cloneable
A size with double's.
- Author:
- Christopher Mindus
- See Also:
- Field SummaryFields
- Constructor SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- clone()Clones this instance.- static int- compareWidthThenHeight- (DSize s1, DSize s2) Compares to sizes by first the width, then the height.- booleanCheck for equality.- int- hashCode()Hash code.- toString()Creates the string representation of this position as className[width=NN,height=NN].
- Field Details- widthpublic double widthThe width.
- heightpublic double heightThe height.
 
- Constructor Details- DSizepublic DSize()Constructs a size initialized to 0,0.
- DSizepublic DSize- (double width, double height) Constructs and initializes position.- Parameters:
- width- The width.
- height- The height.
 
- DSizeConstructs and initializes position.- Parameters:
- s- Another size.
 
 
- Method Details- equalsCheck for equality.
- cloneClones this instance.
- hashCodepublic int hashCode()Hash code.
- toStringCreates the string representation of this position as className[width=NN,height=NN].
- compareWidthThenHeightCompares to sizes by first the width, then the height.- Parameters:
- s1- Size 1 (null allowed).
- s2- Size 2 (null allowed).
- Returns:
- 1 if s2 is wider then higher than s1 (or s2 is null), -1 if smaller (or s1 is null), 0 if equal (or both null).