|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.util.SimpleDataRecord<UserItemCollection>
org.starhope.appius.game.inventory.collections.UserItemCollection
public class UserItemCollection
A (possibly partial) collection of items that an user has collected; c.v. ItemCollectionSet
Field Summary | |
---|---|
private Set<InventoryItem> |
items
the items that this user has collected which are a part of this set |
private AbstractUser |
owner
the owner of this collection |
private EventType |
rewardEvent
WRITEME: Document this brpocock@star-hope.org |
private static long |
serialVersionUID
Java serialization unique ID |
private String |
title
the title of this set |
Fields inherited from class org.starhope.appius.util.SimpleDataRecord |
---|
myLoader, timeLastChanged, timeLastSaved |
Constructor Summary | |
---|---|
UserItemCollection(RecordLoader<UserItemCollection> loader)
WRITEME: Document this constructor brpocock@star-hope.org |
Method Summary | ||
---|---|---|
boolean |
add(InventoryItem e)
|
|
boolean |
addAll(Collection<? extends InventoryItem> c)
|
|
void |
clear()
|
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
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. |
|
Collection<InventoryItem> |
getItems()
|
|
AbstractUser |
getOwner()
|
|
EventType |
getRewardEvent()
|
|
String |
getSubversionRevision()
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence. |
|
String |
getTitle()
|
|
boolean |
isEmpty()
|
|
Iterator<InventoryItem> |
iterator()
|
|
void |
redeemCollectionForUser(AbstractUser user)
twheys@gmail.com Mar 9, 2010 |
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
void |
setOwner(AbstractUser newOwner)
|
|
void |
setRewardEvent(EventType newRewardEvent)
|
|
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, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Field Detail |
---|
private static final long serialVersionUID
private final Set<InventoryItem> items
private AbstractUser owner
private String title
private EventType rewardEvent
Constructor Detail |
---|
public UserItemCollection(RecordLoader<UserItemCollection> loader)
loader
- WRITEMEMethod Detail |
---|
public boolean add(InventoryItem e)
add
in interface Collection<InventoryItem>
Collection.add(java.lang.Object)
public boolean addAll(Collection<? extends InventoryItem> c)
addAll
in interface Collection<InventoryItem>
Collection.addAll(java.util.Collection)
public void clear()
clear
in interface Collection<InventoryItem>
Collection.clear()
public boolean contains(Object o)
contains
in interface Collection<InventoryItem>
Collection.contains(java.lang.Object)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<InventoryItem>
Collection.containsAll(java.util.Collection)
public int getCacheableID() throws NotFoundException
DataRecord
DataRecord.getCacheableID()
or a string identifier (
DataRecord.getCacheableIdent()
or both.
getCacheableID
in interface DataRecord
NotFoundException
- if the item doesn't have a distinct
numeric IDDataRecord.getCacheableID()
public String getCacheableIdent() throws NotFoundException
DataRecord
DataRecord.getCacheableID()
or a string identifier (
DataRecord.getCacheableIdent()
or both.
getCacheableIdent
in interface DataRecord
NotFoundException
- if the item doesn't have a distinct
string identifierDataRecord.getCacheableIdent()
public Collection<InventoryItem> getItems()
public AbstractUser getOwner()
public EventType getRewardEvent()
public String getSubversionRevision()
HasSubversionRevision
Return 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 HasSubversionRevision
HasSubversionRevision.getSubversionRevision()
public String getTitle()
public boolean isEmpty()
isEmpty
in interface Collection<InventoryItem>
Collection.isEmpty()
public Iterator<InventoryItem> iterator()
iterator
in interface Iterable<InventoryItem>
iterator
in interface Collection<InventoryItem>
Collection.iterator()
public void redeemCollectionForUser(AbstractUser user)
twheys@gmail.com Mar 9, 2010TO redeemCollectionForUser WRITEME...
user
- WRITEMEpublic boolean remove(Object o)
remove
in interface Collection<InventoryItem>
Collection.remove(java.lang.Object)
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<InventoryItem>
Collection.removeAll(java.util.Collection)
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<InventoryItem>
Collection.retainAll(java.util.Collection)
public void setOwner(AbstractUser newOwner)
newOwner
- the owner to setpublic void setRewardEvent(EventType newRewardEvent)
newRewardEvent
- the rewardEvent to setpublic void setTitle(String newTitle)
newTitle
- the title to setpublic int size()
size
in interface Collection<InventoryItem>
Collection.size()
public Object[] toArray()
toArray
in interface Collection<InventoryItem>
Collection.toArray()
public <T> T[] toArray(T[] a)
toArray
in interface Collection<InventoryItem>
java.util.Collection#toArray(T[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |