Package uk.ac.starlink.ttools.plot2.geom
Class SideFlags
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.SideFlags
Encapsulates four boolean flags, one for each side of a rectangle.
- Since:
- 24 May 2023
- Author:
- Mark Taylor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSideFlags
(boolean bottom, boolean left, boolean top, boolean right) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
boolean
isBottom()
Returns the state of the flag for the bottom edge.boolean
isLeft()
Returns the state of the flag for the left hand edge.boolean
isRight()
Returns the state of the flag for the right hand edge.boolean
isTop()
Returns the state of the flag for the top edge.toString()
-
Field Details
-
ALL
Instance for which all flags are true. -
NONE
Instance for which all flags are false.
-
-
Constructor Details
-
SideFlags
public SideFlags(boolean bottom, boolean left, boolean top, boolean right) Constructor. The order of parameters corresponds to X, Y, X2, Y2 axes.- Parameters:
bottom
- flag for bottom edge (primary X axis location)left
- flag for left edge (primary Y axis location)top
- flag for top edge (secondary X axis location)right
- flag for right edge (secondary Y axis location)
-
-
Method Details
-
isBottom
public boolean isBottom()Returns the state of the flag for the bottom edge.- Returns:
- bottom flag
-
isLeft
public boolean isLeft()Returns the state of the flag for the left hand edge.- Returns:
- left flag
-
isTop
public boolean isTop()Returns the state of the flag for the top edge.- Returns:
- top flag
-
isRight
public boolean isRight()Returns the state of the flag for the right hand edge.- Returns:
- right flag
-
hashCode
public int hashCode() -
equals
-
toString
-