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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
insert
(int e, int i, akka.actor.ActorRef actorRef, Utils.Vote vote) Insert a vote in the map.void
setDecision
(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, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods 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
-