Class EntryValidator

java.lang.Object
org.skriptlang.skript.lang.entry.EntryValidator

public class EntryValidator extends Object
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:
  • Method Details

    • builder

      public static EntryValidator.EntryValidatorBuilder builder()
      Returns:
      A builder to be used for creating an EntryValidator.
    • getEntryData

      public List<EntryData<?>> getEntryData()
      Returns:
      An unmodifiable list containing all EntryData of this validator.
    • validate

      public @Nullable EntryContainer validate(SectionNode sectionNode)
      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.