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 |
idConverter
FLAG_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()
CMObject
public java.lang.String name()
CMObject
name
in interface CMObject
Environmental.Name()
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public CMObject copyOf()
CMObject
public boolean loaded()
Poll
loaded
in interface Poll
Poll.setLoaded(boolean)
,
PollManager.loadPollIfNecessary(Poll)
public void setLoaded(boolean truefalse)
Poll
setLoaded
in interface Poll
truefalse
- set to true if this object is fully populated from the databasePoll.loaded()
,
PollManager.loadPollIfNecessary(Poll)
public java.lang.String getName()
Poll
getName
in interface Poll
Poll.setName(String)
public void setName(java.lang.String newname)
Poll
setName
in interface Poll
newname
- a name for this pollPoll.getName()
public java.lang.String getSubject()
Poll
getSubject
in interface Poll
Poll.setSubject(String)
public void setSubject(java.lang.String newsubject)
Poll
setSubject
in interface Poll
newsubject
- the title used when showing poll results.Poll.getSubject()
public java.lang.String getDescription()
Poll
getDescription
in interface Poll
Poll.setDescription(String)
public void setDescription(java.lang.String newdescription)
Poll
setDescription
in interface Poll
newdescription
- the description shown when participating in the poll.Poll.getDescription()
public java.lang.String getAuthor()
Poll
getAuthor
in interface Poll
Poll.setAuthor(String)
public void setAuthor(java.lang.String newname)
Poll
setAuthor
in interface Poll
newname
- the Name of the creator of this poll.Poll.getAuthor()
public long getFlags()
Poll
getFlags
in interface Poll
Poll.setFlags(long)
,
Poll.FLAG_ABSTAIN
,
Poll.FLAG_ACTIVE
public void setFlags(long flag)
Poll
setFlags
in interface Poll
flag
- a bitmap of flags related to this poll.Poll.getFlags()
,
Poll.FLAG_ABSTAIN
,
Poll.FLAG_ACTIVE
public java.lang.String getQualZapper()
Poll
getQualZapper
in interface Poll
Poll.setQualZapper(String)
,
MaskingLibrary.maskCheck(String, Environmental, boolean)
public void setQualZapper(java.lang.String newZap)
Poll
setQualZapper
in interface Poll
newZap
- a zapper mask string to mask out valid participants.Poll.getQualZapper()
,
MaskingLibrary.maskCheck(String, Environmental, boolean)
public long getExpiration()
Poll
getExpiration
in interface Poll
Poll.setExpiration(long)
public void setExpiration(long time)
Poll
setExpiration
in interface Poll
time
- the time, in millis since 1970, that this poll expires.Poll.getExpiration()
public java.util.List<Poll.PollOption> getOptions()
Poll
getOptions
in interface Poll
Poll.setOptions(List)
,
Poll.PollOption
public void setOptions(java.util.List<Poll.PollOption> V)
Poll
setOptions
in interface Poll
V
- a list of PollOption objects denoting the poll choices.Poll.getOptions()
,
Poll.PollOption
public java.util.List<Poll.PollResult> getResults()
Poll
getResults
in interface Poll
Poll.getResults()
,
Poll.PollResult
public void setResults(java.util.List<Poll.PollResult> V)
Poll
setResults
in interface Poll
V
- a list of PollResult objects renoting all poll votes.Poll.getResults()
,
Poll.PollResult
public java.lang.String getOptionsXML()
Poll
getOptionsXML
in interface Poll
Poll.getOptions()
,
Poll.PollOption
,
PollManager.loadPollIfNecessary(Poll)
public java.lang.String getResultsXML()
Poll
getResultsXML
in interface Poll
Poll.getResults()
,
Poll.PollResult
,
PollManager.loadPollIfNecessary(Poll)
public Poll.PollResult getMyVote(MOB mob)
Poll
getMyVote
in interface Poll
mob
- the mob to find a result object forPollManager.loadPollIfNecessary(Poll)
,
Poll.addVoteResult(com.planet_ink.coffee_mud.Common.interfaces.Poll.PollResult)
,
Poll.PollResult
public void addVoteResult(Poll.PollResult R)
Poll
addVoteResult
in interface Poll
R
- the particular vote by a particular mob to addPollManager.loadPollIfNecessary(Poll)
,
Poll.getMyVote(MOB)
,
Poll.PollResult
public boolean mayIVote(MOB mob)
Poll
mayIVote
in interface Poll
mob
- the mob to check for eligibilityPoll.getMyVote(MOB)
,
Poll.FLAG_VOTEBYIP
,
Poll.FLAG_ACTIVE
public boolean mayISeeResults(MOB mob)
Poll
mayISeeResults
in interface Poll
mob
- the mob to check for eligibilityPoll.FLAG_HIDERESULTS
,
Poll.FLAG_PREVIEWRESULTS