|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.util.SimpleDataRecord<ItemCollection>
org.starhope.appius.game.inventory.collections.ItemCollection
public class ItemCollection
WRITEME: Document this type.
| Field Summary | |
|---|---|
private int |
collectionID
Unique ID of the collection |
private EventType |
onBreakEvent
event fired when a previously-complete collection is broken |
private EventType |
onCompleteEvent
event fired when the user completes the collection |
private static long |
serialVersionUID
WRITEME: Document this brpocock@star-hope.org |
private List<GenericItemReference> |
set
Internal implementation pass-through collection |
private String |
title
Unique name of the collection |
| Fields inherited from class org.starhope.appius.util.SimpleDataRecord |
|---|
myLoader, timeLastChanged, timeLastSaved |
| Constructor Summary | |
|---|---|
ItemCollection(RecordLoader<ItemCollection> loader)
constructor for collection being loaded |
|
ItemCollection(String newName)
constructor to create a new collection |
|
| Method Summary | ||
|---|---|---|
boolean |
add(GenericItemReference e)
|
|
boolean |
addAll(Collection<? extends GenericItemReference> c)
|
|
void |
clear()
|
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
GenericItemReference |
get(int i)
Return an item from a specific position in the set |
|
int |
getCacheableID()
Note that all records must have either a numeric ID ( DataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both. |
|
String |
getCacheableIdent()
Note that all records must have either a numeric ID ( DataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both. |
|
EventType |
getOnBreakEvent()
|
|
EventType |
getOnCompleteEvent()
|
|
String |
getSubversionRevision()
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence. |
|
boolean |
isEmpty()
|
|
Iterator<GenericItemReference> |
iterator()
|
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
void |
setID(int newID)
|
|
void |
setOnBreakEvent(EventType newOnBreakEvent)
|
|
void |
setOnCompleteEvent(EventType newOnCompleteEvent)
|
|
void |
setTitle(String newTitle)
|
|
int |
size()
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
| Methods inherited from class org.starhope.appius.util.SimpleDataRecord |
|---|
changed, checkStale, compareTo, equals, finalize, getRecordLoader, getTimeLastChanged, getTimeLastSaved, hashCode, isBeingLoaded, markAsLoaded, markAsSaved, markForReload, onRemove, onRetrieve, onStore, save, setRecordLoader, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
equals, hashCode |
| Field Detail |
|---|
private static final long serialVersionUID
private final List<GenericItemReference> set
private String title
private int collectionID
private EventType onCompleteEvent
private EventType onBreakEvent
| Constructor Detail |
|---|
ItemCollection(RecordLoader<ItemCollection> loader)
loader - WRITEME
ItemCollection(String newName)
throws AlreadyExistsException
newName - WRITEME
AlreadyExistsException - if the name is in use already| Method Detail |
|---|
public boolean add(GenericItemReference e)
add in interface Collection<GenericItemReference>Collection.add(java.lang.Object)public boolean addAll(Collection<? extends GenericItemReference> c)
addAll in interface Collection<GenericItemReference>Collection.addAll(java.util.Collection)public void clear()
clear in interface Collection<GenericItemReference>Collection.clear()public boolean contains(Object o)
contains in interface Collection<GenericItemReference>Collection.contains(java.lang.Object)public boolean containsAll(Collection<?> c)
containsAll in interface Collection<GenericItemReference>Collection.containsAll(java.util.Collection)public GenericItemReference get(int i)
i - index
public int getCacheableID()
throws NotFoundException
DataRecordDataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both.
getCacheableID in interface DataRecordNotFoundException - if the item doesn't have a distinct
numeric IDDataRecord.getCacheableID()
public String getCacheableIdent()
throws NotFoundException
DataRecordDataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both.
getCacheableIdent in interface DataRecordNotFoundException - if the item doesn't have a distinct
string identifierDataRecord.getCacheableIdent()public EventType getOnBreakEvent()
public EventType getOnCompleteEvent()
public String getSubversionRevision()
HasSubversionRevisionReturn the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence.
As an example,the Subversion revision string for this file is "$Rev: 1968 $"
@Override
public String getSubversionRevision () {
return "$Rev: ";
}
getSubversionRevision in interface HasSubversionRevisionHasSubversionRevision.getSubversionRevision()public boolean isEmpty()
isEmpty in interface Collection<GenericItemReference>Collection.isEmpty()public Iterator<GenericItemReference> iterator()
iterator in interface Iterable<GenericItemReference>iterator in interface Collection<GenericItemReference>Collection.iterator()public boolean remove(Object o)
remove in interface Collection<GenericItemReference>Collection.remove(java.lang.Object)public boolean removeAll(Collection<?> c)
removeAll in interface Collection<GenericItemReference>Collection.removeAll(java.util.Collection)public boolean retainAll(Collection<?> c)
retainAll in interface Collection<GenericItemReference>Collection.retainAll(java.util.Collection)public void setID(int newID)
newID - the ID for this collectionpublic void setOnBreakEvent(EventType newOnBreakEvent)
newOnBreakEvent - the onBreakEvent to setpublic void setOnCompleteEvent(EventType newOnCompleteEvent)
newOnCompleteEvent - the onCompleteEvent to setpublic void setTitle(String newTitle)
newTitle - the new title of the collectionpublic int size()
size in interface Collection<GenericItemReference>Collection.size()public Object[] toArray()
toArray in interface Collection<GenericItemReference>Collection.toArray()public <T> T[] toArray(T[] a)
toArray in interface Collection<GenericItemReference>java.util.Collection#toArray(T[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||