fr.lifl.magique.util
Class AnswerVector

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended byfr.lifl.magique.util.AnswerVector
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class AnswerVector
extends java.util.Vector

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AnswerVector(boolean concurrent)
           
 
Method Summary
 void addAnswer(Answer answer)
          adds an answer to the vector
 java.lang.Object getAnswerValue()
          gets the value of the answer (which may have been chosen among many)
 int getNumberOfAnswers()
          returns the number of answers received
 Answer getTheAnswer()
          returns the answer chosen as THE answer among all th received answers to the question this vector is associated to
 boolean isConcurrent()
           
 void setTheAnswer(Answer answer)
          ser theAnswer
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

AnswerVector

public AnswerVector(boolean concurrent)
Method Detail

isConcurrent

public boolean isConcurrent()
Returns:
true if it is a concurrent request

getTheAnswer

public Answer getTheAnswer()
returns the answer chosen as THE answer among all th received answers to the question this vector is associated to

Returns:
the answer chosen as THE answer among all th received answers to the question this vector is associated to

setTheAnswer

public void setTheAnswer(Answer answer)
ser theAnswer


addAnswer

public void addAnswer(Answer answer)
adds an answer to the vector

Parameters:
answer - the answer to be added

getNumberOfAnswers

public int getNumberOfAnswers()
returns the number of answers received

Returns:
the number of answers received

getAnswerValue

public java.lang.Object getAnswerValue()
gets the value of the answer (which may have been chosen among many)

Returns:
the value of the answer (which may have been chosen among many)