public final class SubdocumentsImpl extends DocumentWorkerObjectImpl implements Subdocuments
application| Constructor and Description |
|---|
SubdocumentsImpl(ApplicationImpl application,
DocumentImpl document,
List<ReadOnlyDocument> originalSubdocuments) |
| Modifier and Type | Method and Description |
|---|---|
Subdocument |
add(String reference) |
Subdocument |
get(int index) |
DocumentImpl |
getDocument() |
boolean |
hasChanges() |
boolean |
isEmpty() |
Iterator<Subdocument> |
iterator() |
void |
recordChanges(ChangesJournal journal) |
void |
reset() |
int |
size() |
Stream<Subdocument> |
stream() |
getApplicationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetApplicationforEach, spliteratorpublic SubdocumentsImpl(ApplicationImpl application, DocumentImpl document, List<ReadOnlyDocument> originalSubdocuments)
@Nonnull public Subdocument add(String reference)
add in interface Subdocuments@Nonnull public Subdocument get(int index)
Note: Currently this collection does not store which subdocuments are deleted. For this reason the implementation of this method must work through each of the subdocuments and check their status rather than being able to directly go to the correct subdocument. It's easy to imagine that this would not be appropriate if there were a large number of subdocuments. If that were ever to be the case then we would have to implement a callback from the SubdocumentImpl class to create visibility here with regard to which documents have been deleted.
get in interface Subdocumentsindex - index of the subdocument to return@Nonnull public DocumentImpl getDocument()
getDocument in interface Subdocumentspublic boolean isEmpty()
isEmpty in interface Subdocuments@Nonnull public Iterator<Subdocument> iterator()
iterator in interface Iterable<Subdocument>public int size()
size in interface Subdocuments@Nonnull public Stream<Subdocument> stream()
stream in interface Subdocumentspublic boolean hasChanges()
public void reset()
public void recordChanges(ChangesJournal journal)
Copyright © 2016–2021 EntIT Software LLC, a Micro Focus company. All rights reserved.