Interface TomlValue
- All Known Subinterfaces:
TomlArray,TomlDocument,TomlPrimitive,TomlTable
@NonExtendable
public interface TomlValue
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull TomlArrayasArray()Converts this value to aarray.default @NotNull TomlPrimitiveConverts this value to aprimitive.default @NotNull TomlTableasTable()Converts this value to atable.@NotNull Commentscomments()Accesses the comments stored on this valuestatic @NotNull TomlValueReturns a deep copy of the provided valuelongReports the time that this object was created as reported bySystem.nanoTime().intflags()Reports the flags stored on this value.@NotNull TomlValueflags(int flags) Sets the flags stored on this value.default booleanisArray()default booleanReturns true if the value represents aprimitiveandasPrimitive()may be called.default booleanisTable()
-
Method Details
-
copyOf
@Contract("_ -> new") @AvailableSince("0.6.4") @NotNull static @NotNull TomlValue copyOf(@NotNull @NotNull TomlValue other) Returns a deep copy of the provided value -
creationTime
@AvailableSince("1.3.0") long creationTime()Reports the time that this object was created as reported bySystem.nanoTime(). -
flags
@Internal @AvailableSince("1.2.1") int flags()Reports the flags stored on this value. Flags are opaque to consumers but have internal meaning required for spec-compliant reading. -
flags
@Internal @AvailableSince("1.2.1") @Contract("_ -> this") @NotNull @NotNull TomlValue flags(int flags) Sets the flags stored on this value. Flags are opaque to consumers but have internal meaning required for spec-compliant reading. -
comments
Accesses the comments stored on this value -
isPrimitive
default boolean isPrimitive()Returns true if the value represents a
primitiveandasPrimitive()may be called.The return value of this method may or may not be identical to
this instanceof TomlPrimitive. -
asPrimitive
Converts this value to aprimitive. Whether the method returnsthisor not is an implementation detail.- Throws:
UnsupportedOperationException- Value does not represent a primitive (seeisPrimitive())
-
isArray
default boolean isArray() -
asArray
Converts this value to aarray. Whether the method returnsthisor not is an implementation detail.- Throws:
UnsupportedOperationException- Value does not represent an array (seeisArray())
-
isTable
default boolean isTable() -
asTable
Converts this value to atable. Whether the method returnsthisor not is an implementation detail.- Throws:
UnsupportedOperationException- Value does not represent a table (seeisTable())
-