Poll.PollOption, Poll.PollResult| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.String |
author |
|
protected long |
bitmap |
|
protected java.lang.String |
description |
|
protected long |
expiration |
|
boolean |
loaded |
|
protected java.lang.String |
name |
|
protected java.util.List<Poll.PollOption> |
options |
|
protected java.lang.String |
qualZapper |
|
protected java.util.List<Poll.PollResult> |
results |
|
protected java.lang.String |
subject |
idConverterFLAG_ABSTAIN, FLAG_ACTIVE, FLAG_HIDERESULTS, FLAG_NOTATLOGIN, FLAG_PREVIEWRESULTS, FLAG_VOTEBYIP| Constructor | Description |
|---|---|
DefaultPoll() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addVoteResult(Poll.PollResult R) |
Populates this Poll object if necessary, and adds the given PollResult
object that represents a mobs vote in this Poll to the list of results.
|
int |
compareTo(CMObject o) |
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
java.lang.String |
getAuthor() |
Returns the Name of the creator of this poll.
|
java.lang.String |
getDescription() |
Returns the description shown when participating in the poll.
|
long |
getExpiration() |
Returns the time, in millis since 1970, that this poll expires.
|
long |
getFlags() |
Returns a bitmap of flags related to this poll.
|
Poll.PollResult |
getMyVote(MOB mob) |
Populates this Poll object if necessary, and returns the PollResult
object that represents the given mobs vote in this Poll, or NULL otherwise.
|
java.lang.String |
getName() |
A name for this poll, used for internal purposes only.
|
java.util.List<Poll.PollOption> |
getOptions() |
Returns a list of PollOption objects denoting the poll choices.
|
java.lang.String |
getOptionsXML() |
Returns a String of PollOption objects rendered as an XML document.
|
java.lang.String |
getQualZapper() |
Returns a zapper mask string to mask out valid participants.
|
java.util.List<Poll.PollResult> |
getResults() |
Returns a list of PollResult objects renoting all poll votes.
|
java.lang.String |
getResultsXML() |
Returns a String of PollResult objects rendered as an XML document.
|
java.lang.String |
getSubject() |
Returns the title used when showing poll results.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
boolean |
loaded() |
Returns whether the PollOption and PollResult objects have already been
loaded and populated into this object from the database.
|
boolean |
mayISeeResults(MOB mob) |
Returns true if the given mob may not see the poll results, false otherwise.
|
boolean |
mayIVote(MOB mob) |
Returns true if the given mob is allowed to vote in this poll, false otherwise.
|
java.lang.String |
name() |
The displayable name of this object.
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
void |
setAuthor(java.lang.String newname) |
Sets the Name of the creator of this poll.
|
void |
setDescription(java.lang.String newdescription) |
Sets the description shown when participating in the poll.
|
void |
setExpiration(long time) |
Sets the time, in millis since 1970, that this poll expires.
|
void |
setFlags(long flag) |
Sets a bitmap of flags related to this poll.
|
void |
setLoaded(boolean truefalse) |
Sets whether the PollOption and PollResult objects have already been
loaded and populated into this object from the database.
|
void |
setName(java.lang.String newname) |
Sets a name for this poll, used for internal purposes only.
|
void |
setOptions(java.util.List<Poll.PollOption> V) |
Sets a list of PollOption objects denoting the poll choices.
|
void |
setQualZapper(java.lang.String newZap) |
Sets a zapper mask string to mask out valid participants.
|
void |
setResults(java.util.List<Poll.PollResult> V) |
Sets a list of PollResult objects renoting all poll votes.
|
void |
setSubject(java.lang.String newsubject) |
Sets the title used when showing poll results.
|
public boolean loaded
protected java.lang.String name
protected java.lang.String subject
protected java.lang.String description
protected java.lang.String author
protected long expiration
protected long bitmap
protected java.lang.String qualZapper
protected java.util.List<Poll.PollOption> options
protected java.util.List<Poll.PollResult> results
public java.lang.String ID()
CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public CMObject copyOf()
CMObjectpublic boolean loaded()
Pollloaded in interface PollPoll.setLoaded(boolean),
PollManager.loadPollIfNecessary(Poll)public void setLoaded(boolean truefalse)
PollsetLoaded in interface Polltruefalse - set to true if this object is fully populated from the databasePoll.loaded(),
PollManager.loadPollIfNecessary(Poll)public java.lang.String getName()
PollgetName in interface PollPoll.setName(String)public void setName(java.lang.String newname)
PollsetName in interface Pollnewname - a name for this pollPoll.getName()public java.lang.String getSubject()
PollgetSubject in interface PollPoll.setSubject(String)public void setSubject(java.lang.String newsubject)
PollsetSubject in interface Pollnewsubject - the title used when showing poll results.Poll.getSubject()public java.lang.String getDescription()
PollgetDescription in interface PollPoll.setDescription(String)public void setDescription(java.lang.String newdescription)
PollsetDescription in interface Pollnewdescription - the description shown when participating in the poll.Poll.getDescription()public java.lang.String getAuthor()
PollgetAuthor in interface PollPoll.setAuthor(String)public void setAuthor(java.lang.String newname)
PollsetAuthor in interface Pollnewname - the Name of the creator of this poll.Poll.getAuthor()public long getFlags()
PollgetFlags in interface PollPoll.setFlags(long),
Poll.FLAG_ABSTAIN,
Poll.FLAG_ACTIVEpublic void setFlags(long flag)
PollsetFlags in interface Pollflag - a bitmap of flags related to this poll.Poll.getFlags(),
Poll.FLAG_ABSTAIN,
Poll.FLAG_ACTIVEpublic java.lang.String getQualZapper()
PollgetQualZapper in interface PollPoll.setQualZapper(String),
MaskingLibrary.maskCheck(String, Environmental, boolean)public void setQualZapper(java.lang.String newZap)
PollsetQualZapper in interface PollnewZap - a zapper mask string to mask out valid participants.Poll.getQualZapper(),
MaskingLibrary.maskCheck(String, Environmental, boolean)public long getExpiration()
PollgetExpiration in interface PollPoll.setExpiration(long)public void setExpiration(long time)
PollsetExpiration in interface Polltime - the time, in millis since 1970, that this poll expires.Poll.getExpiration()public java.util.List<Poll.PollOption> getOptions()
PollgetOptions in interface PollPoll.setOptions(List),
Poll.PollOptionpublic void setOptions(java.util.List<Poll.PollOption> V)
PollsetOptions in interface PollV - a list of PollOption objects denoting the poll choices.Poll.getOptions(),
Poll.PollOptionpublic java.util.List<Poll.PollResult> getResults()
PollgetResults in interface PollPoll.getResults(),
Poll.PollResultpublic void setResults(java.util.List<Poll.PollResult> V)
PollsetResults in interface PollV - a list of PollResult objects renoting all poll votes.Poll.getResults(),
Poll.PollResultpublic java.lang.String getOptionsXML()
PollgetOptionsXML in interface PollPoll.getOptions(),
Poll.PollOption,
PollManager.loadPollIfNecessary(Poll)public java.lang.String getResultsXML()
PollgetResultsXML in interface PollPoll.getResults(),
Poll.PollResult,
PollManager.loadPollIfNecessary(Poll)public Poll.PollResult getMyVote(MOB mob)
PollgetMyVote in interface Pollmob - the mob to find a result object forPollManager.loadPollIfNecessary(Poll),
Poll.addVoteResult(com.planet_ink.coffee_mud.Common.interfaces.Poll.PollResult),
Poll.PollResultpublic void addVoteResult(Poll.PollResult R)
PolladdVoteResult in interface PollR - the particular vote by a particular mob to addPollManager.loadPollIfNecessary(Poll),
Poll.getMyVote(MOB),
Poll.PollResultpublic boolean mayIVote(MOB mob)
PollmayIVote in interface Pollmob - the mob to check for eligibilityPoll.getMyVote(MOB),
Poll.FLAG_VOTEBYIP,
Poll.FLAG_ACTIVEpublic boolean mayISeeResults(MOB mob)
PollmayISeeResults in interface Pollmob - the mob to check for eligibilityPoll.FLAG_HIDERESULTS,
Poll.FLAG_PREVIEWRESULTS