net.aerith.misao.util
Class Triangle
java.lang.Object
|
+--net.aerith.misao.util.Triangle
- public class Triangle
- extends java.lang.Object
The Triangle
represents a triangle which consists of
three Position
s.
Method Summary |
Position |
element(int n)
Gets a position. |
protected java.lang.String |
paramString()
Returns a raw string representation of the state of this object,
for debugging use. |
java.lang.String |
toString()
Returns a string representation of the state of this object,
for debugging use. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
positions
protected Position[] positions
- The three positions.
Triangle
public Triangle(Position initial_position1,
Position initial_position2,
Position initial_position3)
- Constructs a
Triangle
with three positions.
- Parameters:
initial_position1
- the first (x,y) position.initial_position2
- the second (x,y) position.initial_position3
- the third (x,y) position.
element
public Position element(int n)
- Gets a position.
- Parameters:
n
- the n-th position to be returned.
paramString
protected java.lang.String paramString()
- Returns a raw string representation of the state of this object,
for debugging use. It should be invoked from
toString
method of the subclasses.
- Returns:
- a string representation of the state of this object.
toString
public java.lang.String toString()
- Returns a string representation of the state of this object,
for debugging use.
- Overrides:
- toString in class java.lang.Object
- Returns:
- a string representation of the state of this object.