# Class SideFlags

java.lang.Object
uk.ac.starlink.ttools.plot2.geom.SideFlags

@Equality public class SideFlags extends Object
Encapsulates four boolean flags, one for each side of a rectangle.

Since:
  24 May 2023
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final SideFlags`
`ALL`
Instance for which all flags are true.
`static final SideFlags`
`NONE`
Instance for which all flags are false.

## Constructor Summary

Constructors
Constructor
Description
`SideFlags(boolean bottom, boolean left, boolean top, boolean right)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object other)`
`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.
`String`
`toString()`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### ALL

public static final SideFlags ALL
Instance for which all flags are true.

### NONE

public static final SideFlags 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()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object other)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`