Package it.unitn.disi.ds1.qtop
Class VotersMap
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<ArrayList<Utils.VotePair>>,Collection<ArrayList<Utils.VotePair>>,List<ArrayList<Utils.VotePair>>,RandomAccess,SequencedCollection<ArrayList<Utils.VotePair>>
Class that represents/handle the voters map.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinsert(int e, int i, akka.actor.ActorRef actorRef, Utils.Vote vote) Insert a vote in the map.voidsetDecision(Utils.Decision d, int e, int i) Set the decision for a specific epoch and index.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
VotersMap
public VotersMap()VotersMap constructor.
-
-
Method Details
-
insert
Insert a vote in the map.- Parameters:
e- the epochi- the indexactorRef- the actor referencevote- the vote
-
setDecision
Set the decision for a specific epoch and index.- Parameters:
d- the decisione- the epochi- the index
-