info.magnolia.voting.voters
Class IfVoter

java.lang.Object
  extended by info.magnolia.voting.voters.BaseVoterImpl
      extended by info.magnolia.voting.voters.IfVoter
All Implemented Interfaces:
Voter

public class IfVoter
extends BaseVoterImpl

Conditional voter. If the "condition" voter is positive, returns the "then" voter's value, otherwise returns the "otherwise" voter's value.

Author:
pbracher

Constructor Summary
IfVoter()
           
 
Method Summary
 Voter getCondition()
           
 Voter getOtherwise()
           
 Voter getThen()
           
 void setCondition(Voter condition)
           
 void setOtherwise(Voter otherwise)
           
 void setThen(Voter then)
           
 String toString()
           
 int vote(Object value)
           
 
Methods inherited from class info.magnolia.voting.voters.BaseVoterImpl
getName, isEnabled, setEnabled, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IfVoter

public IfVoter()
Method Detail

vote

public int vote(Object value)

getCondition

public Voter getCondition()

setCondition

public void setCondition(Voter condition)

getThen

public Voter getThen()

setThen

public void setThen(Voter then)

getOtherwise

public Voter getOtherwise()

setOtherwise

public void setOtherwise(Voter otherwise)

toString

public String toString()
Overrides:
toString in class BaseVoterImpl


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.