|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreservation.system.Flight
This class hold fligth structure. This object could be asserted in the FlightList
.
Field Summary | |
static int |
ROW_LENGTH_MAX
The maximum number of length of each row in a flight |
static int |
ROWS_MAX
The maximum number of rows in a flight |
Constructor Summary | |
Flight(java.lang.String flightName,
Pos dimension)
Construct a Flight named flightName with the size dimension |
Method Summary | |
void |
_check()
Verify invariants : - regex [[A-Z]*[a-z]*[0-9]*]+- dimension < ( ROWS_MAX ,ROWS_LENGHT_MAX ) and > 0
|
protected java.lang.Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(java.lang.Object anObject)
Overide equals |
Pos |
getDimension()
Return the dimension (Rows and row length) of the flight |
java.lang.String |
getFlightName()
Return the name of the fligth |
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 |
Field Detail |
public static final int ROWS_MAX
flight
public static final int ROW_LENGTH_MAX
flight
Constructor Detail |
public Flight(java.lang.String flightName, Pos dimension) throws java.lang.Exception
Flight
named flightName
with the size dimension
flightName
- Name of the flight. This name is used to Lists
the flightdimension
- The size of the flight : number of rows and row length
java.lang.Exception
- When value dosn't make sense, this exception is thrownMethod Detail |
public java.lang.String getFlightName()
fligth
public Pos getDimension()
dimension
(Rows and row length) of the flight
public 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
Flight
object.public 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
otherwiseprotected java.lang.Object clone() throws java.lang.CloneNotSupportedException
Flight
object
java.lang.CloneNotSupportedException
- if the object's class does not support the Cloneable
interface.public void _check() throws java.lang.Exception, java.lang.NullPointerException
-regex
[[A-Z]*[a-z]*[0-9]*]+
- dimension < (ROWS_MAX
,ROWS_LENGHT_MAX
) and > 0
java.lang.NullPointerException
- if pos or name is null
java.lang.Exception
- if the invariant is violated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |