Package | Description |
---|---|
myhw3.data |
Modifier and Type | Class and Description |
---|---|
private static class |
InventorySet.RecordObj
Implementation of Record interface.
|
Modifier and Type | Field and Description |
---|---|
private Record |
CmdAdd.oldvalue |
private Record |
CmdIn.oldvalue |
private Record |
CmdOut.oldvalue |
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 |
---|---|
(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.
|
Record |
Inventory.get(Video v)
Return the record for a given Video; if not present, return
null . |
Record |
InventorySet.get(Video v) |
Modifier and Type | Method and Description |
---|---|
(package private) java.util.Map<Video,Record> |
InventorySet.clear()
Remove all records from the inventory.
|
java.util.Iterator<Record> |
Inventory.iterator()
Return an iterator over Records in the Inventory.
|
java.util.Iterator<Record> |
InventorySet.iterator() |
java.util.Iterator<Record> |
Inventory.iterator(java.util.Comparator<Record> comparator)
Return an iterator over the Inventory, sorted accoring the
Comparator.
|
java.util.Iterator<Record> |
InventorySet.iterator(java.util.Comparator<Record> comparator) |
Modifier and Type | Method and Description |
---|---|
(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 |
---|---|
java.util.Iterator<Record> |
Inventory.iterator(java.util.Comparator<Record> comparator)
Return an iterator over the Inventory, sorted accoring the
Comparator.
|
java.util.Iterator<Record> |
InventorySet.iterator(java.util.Comparator<Record> comparator) |
(package private) void |
InventorySet.replaceMap(java.util.Map<Video,Record> data)
Overwrite the map.
|