|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.cms.publication.util.DocumentSet
public class DocumentSet
An ordered set of documents without duplicates.
Constructor Summary | |
---|---|
DocumentSet()
Ctor. |
|
DocumentSet(Document[] _documents)
Ctor. |
Method Summary | |
---|---|
void |
add(Document document)
Adds a document to this set. |
void |
addAll(DocumentSet set)
Adds a document set to this set. |
void |
clear()
Removes all documents. |
boolean |
contains(Document document)
|
Document[] |
getDocuments()
Returns the documents contained in this set. |
protected java.util.List |
getList()
Returns the list object that stores the documents. |
boolean |
isEmpty()
Checks if this set is empty. |
void |
remove(Document resource)
Removes a document. |
void |
removeAll(DocumentSet set)
Removes all documents in a set from this set. |
void |
reverse()
Reverses the document order. |
void |
visit(DocumentVisitor visitor)
Visits the set. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentSet()
public DocumentSet(Document[] _documents)
_documents
- The initial documents.Method Detail |
---|
protected java.util.List getList()
public Document[] getDocuments()
public void add(Document document)
document
- The document to add.
java.lang.IllegalArgumentException
- if the document is null
or already contained.public void addAll(DocumentSet set)
set
- The documents to add.public boolean contains(Document document)
document
- The document.
public boolean isEmpty()
public void visit(DocumentVisitor visitor) throws PublicationException
visitor
- The visitor.
PublicationException
- if an error occurs during visiting.public void remove(Document resource) throws PublicationException
resource
- The document.
PublicationException
- if an error occurs.public void removeAll(DocumentSet set) throws PublicationException
set
- The set.
PublicationException
- if an error occurs.public void clear()
public void reverse()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |