info.magnolia.voting.voters
Class InverseVoter<T>

java.lang.Object
  extended by info.magnolia.voting.voters.BaseVoterImpl<T>
      extended by info.magnolia.voting.voters.InverseVoter<T>
Type Parameters:
T - the type of object passed to vote
All Implemented Interfaces:
Voter<T>

public class InverseVoter<T>
extends BaseVoterImpl<T>

Inverses the returned value of the wrapped voter. ( 5 --> -5)


Constructor Summary
InverseVoter()
           
 
Method Summary
 Voter<T> getVoter()
           
 void setVoter(Voter<T> vote)
           
 int vote(T value)
           
 
Methods inherited from class info.magnolia.voting.voters.BaseVoterImpl
getName, isEnabled, setEnabled, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InverseVoter

public InverseVoter()
Method Detail

vote

public int vote(T value)

getVoter

public Voter<T> getVoter()

setVoter

public void setVoter(Voter<T> vote)


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