info.magnolia.voting.voters
Class AbstractBoolVoter<T>
java.lang.Object
info.magnolia.voting.voters.BaseVoterImpl<T>
info.magnolia.voting.voters.AbstractBoolVoter<T>
- Type Parameters:
T
- the type of object passed to vote
- All Implemented Interfaces:
- Voter<T>
- Direct Known Subclasses:
- AuthenticatedVoter, BasePatternVoter, DelegateVoter, DomainNameRegexVoter, DontDispatchOnForwardAttributeVoter, ExtensionVoter, FalseVoter, ForwardVoter, NotVoter, OnAdminVoter, PropertyVoter, RequestHasParametersVoter, ResponseContentTypeVoter, TrueVoter, UserAgentVoter
public abstract class AbstractBoolVoter<T>
- extends BaseVoterImpl<T>
Used to create boolean voters which can't return integer values. You can
stear the returned values by setting the trueValue and falseValue. To inverse
the result of the boolVote method use the not property.
AbstractBoolVoter
public AbstractBoolVoter()
vote
public int vote(T value)
getFalseValue
public int getFalseValue()
setFalseValue
public void setFalseValue(int negativeVoteValue)
getTrueValue
public int getTrueValue()
setTrueValue
public void setTrueValue(int positiveVoteValue)
boolVote
protected abstract boolean boolVote(T value)
isNot
public boolean isNot()
setNot
public void setNot(boolean not)
toString
public String toString()
- Overrides:
toString
in class BaseVoterImpl<T>
getLevel
public int getLevel()
setLevel
public void setLevel(int level)
Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.