tribble.archive
Class AbstractDocumentSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<AbstractDocument>
          extended by tribble.archive.AbstractDocumentSet
All Implemented Interfaces:
java.lang.Iterable<AbstractDocument>, java.util.Collection<AbstractDocument>, java.util.Set<AbstractDocument>

public class AbstractDocumentSet
extends java.util.AbstractSet<AbstractDocument>
implements java.util.Set<AbstractDocument>

Asbtract generic document set.

An archive document set is a collection of zero or more archive documents. Such a set is typically the result of a query performed on an archive.

Note: This requires Java 1.5 or later.

Source code:
http://david.tribble.com/src/java/tribble/archive/AbstractDocumentSet.java
Documentation:
http://david.tribble.com/docs/tribble/archive/AbstractDocumentSet.html

Since:
2008-04-03
Version:
API 2.0, $Revision: 1.1 $ $Date: 2008/04/03 21:53:34 $
Author:
David R. Tribble (david@tribble.com) Copyright ©2009 by David R. Tribble, all rights reserved.
See Also:
AbstractDocumentIterator, ArchiveReader

Field Summary
protected  java.util.ArrayList<AbstractDocument> m_docs
          Document set.
protected  int m_modCount
          Modification serial number.
 
Constructor Summary
protected AbstractDocumentSet()
          Constructor.
 
Method Summary
 boolean add(AbstractDocument doc)
          Add a document to this document set.
protected  boolean addDocument(AbstractDocument doc)
          Add a document to this document set.
 AbstractDocumentIterator iterator()
          Get an iterator for the documents in this document set.
 int size()
          Determine the number of documents within this document set.
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

m_docs

protected java.util.ArrayList<AbstractDocument> m_docs
Document set.


m_modCount

protected int m_modCount
Modification serial number.

Constructor Detail

AbstractDocumentSet

protected AbstractDocumentSet()
Constructor.

Since:
API 2.0, 2008-04-03
Method Detail

size

public int size()
Determine the number of documents within this document set.

Specified by:
size in interface java.util.Collection<AbstractDocument>
Specified by:
size in interface java.util.Set<AbstractDocument>
Specified by:
size in class java.util.AbstractCollection<AbstractDocument>
Returns:
The count of documents contained within the document set (which can be zero).
Since:
API 2.0, 2008-04-03

iterator

public AbstractDocumentIterator iterator()
Get an iterator for the documents in this document set.

Specified by:
iterator in interface java.lang.Iterable<AbstractDocument>
Specified by:
iterator in interface java.util.Collection<AbstractDocument>
Specified by:
iterator in interface java.util.Set<AbstractDocument>
Specified by:
iterator in class java.util.AbstractCollection<AbstractDocument>
Since:
API 2.0, 2008-04-03

add

public boolean add(AbstractDocument doc)
            throws java.lang.UnsupportedOperationException
Add a document to this document set.

Note: This method always throws UnsupportedOperationException.

Specified by:
add in interface java.util.Collection<AbstractDocument>
Specified by:
add in interface java.util.Set<AbstractDocument>
Overrides:
add in class java.util.AbstractCollection<AbstractDocument>
Throws:
java.lang.UnsupportedOperationException
Since:
API 2.0, 2008-04-03

addDocument

protected boolean addDocument(AbstractDocument doc)
Add a document to this document set.

Note: This method differs from add() in that it is meant to be called only by the subclasses implementing an ArchiveReader.

Since:
API 2.0, 2008-04-03