Package org.skriptlang.skript.lang.entry
Class EntryValidator
java.lang.Object
org.skriptlang.skript.lang.entry.EntryValidator
A validator for storing
EntryData.
It can be used to validate whether a SectionNode contains the required entries.
This validation process will return an EntryContainer for accessing entry values.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA utility builder for creating an entry validator that can be used to parse and validate aSectionNode. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()@Nullable EntryContainervalidate(SectionNode sectionNode) Validates a node using this entry validator.
-
Method Details
-
builder
- Returns:
- A builder to be used for creating an
EntryValidator.
-
getEntryData
- Returns:
- An unmodifiable list containing all
EntryDataof this validator.
-
validate
Validates a node using this entry validator.- Parameters:
sectionNode- The node to validate.- Returns:
- A pair containing a map of handled nodes and a list of unhandled nodes (if this validator permits unhandled nodes) The returned map uses the matched entry data's key as a key and uses a pair containing the entry data and matching node Will return null if the provided node couldn't be validated.
-