public class Arch
extends java.lang.Object
Constructor and Description |
---|
Arch(int width,
int height)
Creates a new arch.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getHeight()
Gets the height of the arch.
|
int |
getValue(int x)
Gets the position of the arch at
x . |
int |
getWidth()
Gets the width of the arch.
|
int |
hashCode() |
java.lang.String |
toString() |
public Arch(int width, int height)
width
- the width of the archheight
- the height of the archjava.lang.IllegalArgumentException
- if either of width
or
height
is smaller than 1public int getWidth()
public int getHeight()
public int getValue(int x)
x
. x
must
be between 0 (incl.) and width
(excl.). The result
will be between 0 (incl.) and height
(excl.).x
- the x componentpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object