|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreservation.system.Pos
This class hold Pos structure. This object define the dimention of a Flight
and the seat for a
.
Person
Constructor Summary | |
Pos(short row,
short col)
Construct a Pos object. |
Method Summary | |
void |
_check()
Verify invariants : - dimension > 0 |
protected java.lang.Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(java.lang.Object anObject)
Overide equals |
short |
getCol()
Return The length of a row for a Flight and the col of the seat for a Person . |
short |
getRow()
Return The number of rows for a Flight and the row of the seat for a Person . |
java.lang.String |
toString()
Returns a string representation of this Flight object. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Pos(short row, short col) throws java.lang.Exception
Pos
object.
row
- The number of rows
for a Flight
and the row of the seat for a Person
.col
- The length of a row
for a Flight
and the col of the seat for a Person
.
java.lang.Exception
- When value dosn't make sense, this exception is thrownMethod Detail |
public short getRow() throws java.lang.Exception
rows
for a Flight
and the row of the seat for a Person
.
java.lang.Exception
- when the invariant is violatedpublic short getCol() throws java.lang.Exception
row
for a Flight
and the col of the seat for a Person
.
java.lang.Exception
- when the invariant is violatedpublic boolean equals(java.lang.Object anObject)
anObject
- anObject
- the reference object with which to compare
true
if this object is the same as the obj argument;
false
otherwisepublic java.lang.String toString()
Flight
object. This method
is intended to be used only for debugging purposes, and the content and format
of the returned string may vary between implementations. The returned string may
be empty but may not be null
Pos
object.protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
Pos
object
java.lang.CloneNotSupportedException
- if the object's class does not support the Cloneable
interface.public void _check() throws java.lang.Exception
- dimension > 0
java.lang.Exception
- if the invariant is violated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |