Class Section

java.lang.Object
net.dzikoysk.cdn.model.Section
All Implemented Interfaces:
Element<List<? extends Element<?>>>, NamedElement<List<? extends Element<?>>>
Direct Known Subclasses:
Array, Configuration

public class Section extends Object
Represents a list of configuration elements
  • Field Details

    • description

      protected final List<? extends String> description
    • name

      protected final String name
    • value

      protected List<? extends Element<?>> value
  • Constructor Details

  • Method Details

    • append

      public <E extends Element<?>> E append(E element)
    • setString

      public void setString(String key, String value)
    • has

      @Contract("null -> false") public boolean has(String key)
    • size

      public int size()
    • get

      public panda.std.Option<Element<?>> get(int index)
    • get

      @Contract("null -> null") public panda.std.Option<Element<?>> get(String key)
    • getList

      @Contract("_, null -> null") public List<String> getList(String key, List<String> defaultValue)
    • getList

      public panda.std.Option<List<String>> getList(String key)
    • getBoolean

      public panda.std.Option<Boolean> getBoolean(String key)
    • getBoolean

      public boolean getBoolean(String key, boolean defaultValue)
    • getInt

      public panda.std.Option<Integer> getInt(String key)
    • getInt

      public int getInt(String key, int defaultValue)
    • getString

      public panda.std.Option<String> getString(String key)
    • getString

      @Contract("_, null -> null") public String getString(String key, String defaultValue)
    • getEntry

      public panda.std.Option<Entry> getEntry(int index)
    • getEntry

      public panda.std.Option<Entry> getEntry(String key)
    • getArray

      public panda.std.Option<Array> getArray(int index)
    • getArray

      public panda.std.Option<Array> getArray(String key)
    • getSection

      public panda.std.Option<Section> getSection(int index)
    • getSection

      public panda.std.Option<Section> getSection(String key)
    • getOperators

      public String[] getOperators()
    • collector

      public static Collector<Element<?>,Section,Section> collector(Supplier<Section> sectionSupplier)
    • setValue

      public void setValue(List<? extends Element<?>> value)
    • getDescription

      public List<? extends String> getDescription()
      Specified by:
      getDescription in interface Element<T>
    • getValue

      public List<? extends Element<?>> getValue()
      Specified by:
      getValue in interface Element<T>
    • getName

      public String getName()
      Description copied from interface: NamedElement
      The name of element
      Specified by:
      getName in interface NamedElement<T>
      Returns:
      element name