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

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

public class AndVoting<T>
extends Object
implements Voting<T>

Return the maximum vote but only if all voters voted positive.


Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.voting.Voting
Voting.Factory
 
Field Summary
 
Fields inherited from interface info.magnolia.voting.Voting
AND, HIGHEST_LEVEL, OR
 
Constructor Summary
AndVoting()
           
 
Method Summary
 int vote(Voter<T>[] voters, T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndVoting

public AndVoting()
Method Detail

vote

public int vote(Voter<T>[] voters,
                T value)
Specified by:
vote in interface Voting<T>


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