public enum NoDocumentContext extends Enum<NoDocumentContext> implements DocumentContext
| Enum Constant and Description |
|---|
INSTANCE |
NOOP| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
index()
Index last read, only available for read contexts.
|
boolean |
isData()
Checks if the
DocumentContext is data. |
boolean |
isMetaData()
Checks it the
DocumentContext is metadata. |
boolean |
isNotComplete() |
boolean |
isPresent()
Checks if the
DocumentContext is present. |
void |
reset()
call close once, then discard any remaining state
|
int |
sourceId()
Returns the source id of this source context.
|
static NoDocumentContext |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NoDocumentContext[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Wire |
wire()
Returns the
Wire associated with the Document. |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfisOpen, rollbackOnClosepublic static final NoDocumentContext INSTANCE
public static NoDocumentContext[] values()
for (NoDocumentContext c : NoDocumentContext.values()) System.out.println(c);
public static NoDocumentContext valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isMetaData()
DocumentContextDocumentContext is metadata. If it is, true is
returned, otherwise false.isMetaData in interface DocumentContextpublic boolean isPresent()
DocumentContextDocumentContext is present. If it is, true is returned,
otherwise false.isPresent in interface DocumentContextpublic boolean isData()
DocumentContextDocumentContext is data. If it is, true is returned,
otherwise falseisData in interface DocumentContextpublic Wire wire()
DocumentContextWire associated with the Document. It is possible that
null is returned, depending on the implementation.wire in interface DocumentContextWire associated with the Document.public int sourceId()
SourceContextsourceId in interface SourceContextpublic long index()
SourceContextindex in interface SourceContextpublic boolean isNotComplete()
isNotComplete in interface DocumentContextpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface DocumentContextpublic void reset()
DocumentContextreset in interface DocumentContextCopyright © 2023. All rights reserved.