org.bolson.vote
Class VotingSystemFactory
java.lang.Object
org.bolson.vote.VotingSystemFactory
public class VotingSystemFactory
- extends java.lang.Object
VoteSouce with Options
Store configuration for a VoteSource ready to produce one when numc is known.
Constructor Summary |
VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn)
|
VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn,
boolean onDefIn)
|
VotingSystemFactory(java.lang.Class vsClass,
java.lang.String nameIn,
java.lang.String soIn)
|
VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn,
java.lang.String[] argvIn)
|
VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn,
java.lang.String[] argvIn,
boolean onDefIn)
|
VotingSystemFactory(java.lang.Class vsClass,
java.lang.String nameIn,
java.lang.String soIn,
java.lang.String[] argvIn)
|
VotingSystemFactory(java.lang.Class vsClass,
java.lang.String nameIn,
java.lang.String soIn,
java.lang.String[] argvIn,
boolean onDefIn)
|
VotingSystemFactory(VotingSystem vsIn,
java.lang.String soIn)
|
VotingSystemFactory(VotingSystem vsIn,
java.lang.String[] argvIn,
java.lang.String soIn)
|
VotingSystemFactory(VotingSystem vsIn,
java.lang.String[] argvIn,
java.lang.String soIn,
boolean on)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
public java.lang.String name
f
public java.lang.reflect.Constructor f
argv
public java.lang.String[] argv
shortOpt
public java.lang.String shortOpt
onDef
public boolean onDef
standardVotingSystemList
public static final VotingSystemFactory[] standardVotingSystemList
- Suggestion: take a .clone() of this array and set the onDef flags
VotingSystemFactory
public VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn,
boolean onDefIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(java.lang.Class vsClass,
java.lang.String nameIn,
java.lang.String soIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(java.lang.Class vsClass,
java.lang.String nameIn,
java.lang.String soIn,
java.lang.String[] argvIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn,
java.lang.String[] argvIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(java.lang.Class vsClass,
java.lang.String nameIn,
java.lang.String soIn,
java.lang.String[] argvIn,
boolean onDefIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(java.lang.Class vsClass,
java.lang.String soIn,
java.lang.String[] argvIn,
boolean onDefIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(VotingSystem vsIn,
java.lang.String soIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(VotingSystem vsIn,
java.lang.String[] argvIn,
java.lang.String soIn)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
VotingSystemFactory
public VotingSystemFactory(VotingSystem vsIn,
java.lang.String[] argvIn,
java.lang.String soIn,
boolean on)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
desc
public java.lang.String desc()
fromDesc
public static VotingSystemFactory fromDesc(java.lang.String d)
build
public VotingSystem build(int numc)
buildAll
public static VotingSystem[] buildAll(VotingSystemFactory[] vsl,
int numc)
- convenience function
buildEnabled
public static VotingSystem[] buildEnabled(VotingSystemFactory[] vsl,
int numc)
- return array of VotingSystem for which vsl[].onDef is true
main
public static void main(java.lang.String[] argv)