@Immutable public class SizeLong extends Object implements IHasDimensionLong
| Constructor and Description |
|---|
SizeLong(IHasDimensionInt aObj) |
SizeLong(IHasDimensionLong aObj) |
SizeLong(long nWidth,
long nHeight) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
SizeLong |
getAdded(IHasDimensionLong aToAdd) |
SizeLong |
getBestMatchingSize(long nMaxWidth,
long nMaxHeight)
Return the scaled width and height relative to a maximum size.
|
long |
getHeight() |
SizeLong |
getScaledToHeight(long nNewHeight) |
SizeLong |
getScaledToWidth(long nNewWidth) |
SizeLong |
getSubtracted(IHasDimensionLong aToSubtract) |
long |
getWidth() |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisLandscape, isPortrait, isQuadraticpublic SizeLong(@Nonnull IHasDimensionInt aObj)
public SizeLong(@Nonnull IHasDimensionLong aObj)
public SizeLong(@Nonnegative long nWidth, @Nonnegative long nHeight)
@Nonnegative public long getWidth()
getWidth in interface IHasWidthLong@Nonnegative public long getHeight()
getHeight in interface IHasHeightLong@Nonnull @CheckReturnValue public SizeLong getBestMatchingSize(@Nonnegative long nMaxWidth, @Nonnegative long nMaxHeight)
nMaxWidth - Maximum width. Must be > 0.nMaxHeight - Maximum height. Must be > 0.@Nonnull @CheckReturnValue public SizeLong getScaledToWidth(@Nonnegative long nNewWidth)
@Nonnull @CheckReturnValue public SizeLong getScaledToHeight(@Nonnegative long nNewHeight)
@Nonnull @CheckReturnValue public SizeLong getAdded(@Nonnull IHasDimensionLong aToAdd)
@Nonnull @CheckReturnValue public SizeLong getSubtracted(@Nonnull IHasDimensionLong aToSubtract)
Copyright © 2014–2022 Philip Helger. All rights reserved.