com.sun.j2ee.blueprints.smarticket.ejb.ticketsales
Class SeatingPlan
java.lang.Object
|
+--com.sun.j2ee.blueprints.smarticket.ejb.ticketsales.SeatingPlan
- All Implemented Interfaces:
- java.io.Serializable
- public class SeatingPlan
- extends java.lang.Object
- implements java.io.Serializable
Represents a seating plan for a show.
The seating plan is rectangular, with array-style indices.
That is, rows are indexed from 0 to r-1 inclusive, where
r is the number of rows in the seating plan, and seats are
indexed from 0 to s-1 inclusive, where s is the number of
seats in the seating plan.
- See Also:
- Serialized Form
Method Summary |
java.lang.String |
getRow(int r)
|
int |
getRowCount()
|
int |
getRowLength()
|
byte[] |
getSeatData()
|
byte |
getStatusOf(int r,
int s)
|
boolean |
hasBooking(int r)
|
boolean |
isAisle(int r,
int s)
|
boolean |
isAvailable(int r,
int s)
|
boolean |
isBooked(int r,
int s)
|
boolean |
isUnavailable(int r,
int s)
|
void |
setAvailable(int r,
int s)
|
void |
setBooked(int r,
int s)
|
void |
setRow(int r,
java.lang.String seats)
|
void |
setStatusOf(int r,
int s,
byte status)
|
void |
setUnavailable(int r,
int s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AISLE
public static final byte AISLE
AVAILABLE
public static final byte AVAILABLE
UNAVAILABLE
public static final byte UNAVAILABLE
BOOKED
public static final byte BOOKED
seats
protected byte[] seats
rows
protected int rows
rowLength
protected int rowLength
SeatingPlan
public SeatingPlan()
SeatingPlan
public SeatingPlan(int rowCount,
int rowLen)
SeatingPlan
public SeatingPlan(byte[] seating,
int rowCount,
int rowLen)
SeatingPlan
public SeatingPlan(SeatingPlan sp)
getRowCount
public int getRowCount()
getRowLength
public int getRowLength()
getSeatData
public byte[] getSeatData()
isAisle
public boolean isAisle(int r,
int s)
isAvailable
public boolean isAvailable(int r,
int s)
isBooked
public boolean isBooked(int r,
int s)
isUnavailable
public boolean isUnavailable(int r,
int s)
getStatusOf
public byte getStatusOf(int r,
int s)
setStatusOf
public void setStatusOf(int r,
int s,
byte status)
setAvailable
public void setAvailable(int r,
int s)
setBooked
public void setBooked(int r,
int s)
setUnavailable
public void setUnavailable(int r,
int s)
hasBooking
public boolean hasBooking(int r)
setRow
public void setRow(int r,
java.lang.String seats)
getRow
public java.lang.String getRow(int r)
Copyright © 2002 Sun Microsystems Inc. All rights reserved.