public AnonymousVoteList(Value value) throws BadValueException
	{
		if(!value.hasChildren(ValueIdentifiers.getVotes()) ||
		   !value.hasChildren(ValueIdentifiers.getSignature())) {
					throw new BadValueException();
			}
		
		listOfVotes = new ArrayList<AnonymousVote>();
		ValueVector votesVector = value.getChildren(ValueIdentifiers.getVotes());
		for(Value v : votesVector) {
			if(!v.hasChildren(ValueIdentifiers.getVote()) ||
			   !v.hasChildren(ValueIdentifiers.getIndex())) {
								throw new BadValueException();
			}
			listOfVotes.add(constructVote(v.getChildren(ValueIdentifiers.getVote()), v.getFirstChild(ValueIdentifiers.getIndex())));
		}
		
		Collections.sort(listOfVotes, new Comparator<AnonymousVote>() {
			public int compare(AnonymousVote v1, AnonymousVote v2) {
				return Integer.compare(v1.getIndex(), v2.getIndex());
			}
		});

		signature = value.getFirstChild(ValueIdentifiers.getSignature()).byteArrayValue().getBytes();
	}