Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.history
Class DefaultQueryResultSet<T>

java.lang.Object
  extended by net.java.sip.communicator.service.history.DefaultQueryResultSet<T>
All Implemented Interfaces:
Iterator<T>, BidirectionalIterator<T>, QueryResultSet<T>

public class DefaultQueryResultSet<T>
extends Object
implements QueryResultSet<T>

Author:
Alexander Pelov

Constructor Summary
DefaultQueryResultSet(Vector<T> records)
           
 
Method Summary
 boolean hasNext()
           
 boolean hasPrev()
          Returns true if the iteration has elements preceeding the current one.
 T next()
           
 T nextRecord()
          A strongly-typed variant of next().
 T prev()
          Returns the previous element in the iteration.
 T prevRecord()
          A strongly-typed variant of prev().
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultQueryResultSet

public DefaultQueryResultSet(Vector<T> records)
Method Detail

nextRecord

public T nextRecord()
             throws NoSuchElementException
Description copied from interface: QueryResultSet
A strongly-typed variant of next().

Specified by:
nextRecord in interface QueryResultSet<T>
Returns:
the next history record.
Throws:
NoSuchElementException - iteration has no more elements.

prevRecord

public T prevRecord()
             throws NoSuchElementException
Description copied from interface: QueryResultSet
A strongly-typed variant of prev().

Specified by:
prevRecord in interface QueryResultSet<T>
Returns:
the previous history record.
Throws:
NoSuchElementException - iteration has no more elements.

hasPrev

public boolean hasPrev()
Description copied from interface: BidirectionalIterator
Returns true if the iteration has elements preceeding the current one. (In other words, returns true if prev would return an element rather than throwing an exception.)

Specified by:
hasPrev in interface BidirectionalIterator<T>
Returns:
true if the iterator has preceeding elements.

prev

public T prev()
       throws NoSuchElementException
Description copied from interface: BidirectionalIterator
Returns the previous element in the iteration.

Specified by:
prev in interface BidirectionalIterator<T>
Returns:
the previous element in the iteration.
Throws:
NoSuchElementException - iteration has no more elements.

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>

next

public T next()
Specified by:
next in interface Iterator<T>

remove

public void remove()
            throws UnsupportedOperationException
Specified by:
remove in interface Iterator<T>
Throws:
UnsupportedOperationException

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.