Package | Description |
---|---|
myhw3.data |
Modifier and Type | Field and Description |
---|---|
private Video |
CmdAdd.video |
private Video |
CmdIn.video |
private Video |
CmdOut.video |
(package private) Video |
InventorySet.RecordObj.video |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Video,Record> |
InventorySet.data |
private java.util.Map<Video,Record> |
CmdClear.oldvalue |
Modifier and Type | Method and Description |
---|---|
static Video |
Data.newVideo(java.lang.String title,
int year,
java.lang.String director)
Factory method for Video objects.
|
Video |
InventorySet.RecordObj.video() |
Video |
Record.video()
Returns the video.
|
Modifier and Type | Method and Description |
---|---|
(package private) java.util.Map<Video,Record> |
InventorySet.clear()
Remove all records from the inventory.
|
Modifier and Type | Method and Description |
---|---|
(package private) Record |
InventorySet.addNumOwned(Video video,
int change)
Add or remove copies of a video from the inventory.
|
(package private) Record |
InventorySet.checkIn(Video video)
Check in a video.
|
(package private) Record |
InventorySet.checkOut(Video video)
Check out a video.
|
int |
Video.compareTo(Video that)
Compares the attributes of this object with those of thatObject, in
the following order: title, year, director.
|
int |
VideoObj.compareTo(Video that) |
Record |
Inventory.get(Video v)
Return the record for a given Video; if not present, return
null . |
Record |
InventorySet.get(Video v) |
static Command |
Data.newAddCmd(Inventory inventory,
Video video,
int change)
Returns a command to add or remove copies of a video from the inventory.
|
static Command |
Data.newInCmd(Inventory inventory,
Video video)
Returns a command to check in a video.
|
static Command |
Data.newOutCmd(Inventory inventory,
Video video)
Returns a command to check out a video.
|
(package private) void |
InventorySet.replaceEntry(Video video,
Record record)
If
record is null, then delete record for video ;
otherwise replace record for video . |
Modifier and Type | Method and Description |
---|---|
(package private) void |
InventorySet.replaceMap(java.util.Map<Video,Record> data)
Overwrite the map.
|
Constructor and Description |
---|
CmdAdd(InventorySet inventory,
Video video,
int change) |
CmdIn(InventorySet inventory,
Video video) |
CmdOut(InventorySet inventory,
Video video) |
RecordObj(Video video,
int numOwned,
int numOut,
int numRentals) |