Interface UnmodifiableConfig.Entry

All Known Subinterfaces:
CommentedConfig.Entry, Config.Entry, UnmodifiableCommentedConfig.Entry
All Known Implementing Classes:
AbstractCommentedConfig.CommentedEntryWrapper, AbstractConfig.EntryWrapper
Enclosing interface:
UnmodifiableConfig

public static interface UnmodifiableConfig.Entry
An unmodifiable config entry.
  • Method Details

    • getKey

      String getKey()
      Returns:
      the entry's key
    • getRawValue

      <T> T getRawValue()
      Returns the entry's value without converting NullObject.NULL_OBJECT to null.
      Type Parameters:
      T - the value's type
      Returns:
      the entry's value
    • getValue

      default <T> T getValue()
      Type Parameters:
      T - the value's type
      Returns:
      the entry's value
    • isNull

      default boolean isNull()
      Returns:
      true if the value is NullObject.NULL_OBJECT.
    • getOptional

      default <T> Optional<T> getOptional()
      Type Parameters:
      T - the value's type
      Returns:
      the entry's value, wrapped in Optional
    • getOrElse

      default <T> T getOrElse(T defaultValue)
    • getInt

      default int getInt()
      Returns:
      the entry's value as an int
    • getOptionalInt

      default OptionalInt getOptionalInt()
    • getIntOrElse

      default int getIntOrElse(int defaultValue)
    • getLong

      default long getLong()
      Returns:
      the entry's value as a long
    • getOptionalLong

      default OptionalLong getOptionalLong()
    • getLongOrElse

      default long getLongOrElse(long defaultValue)
    • getByte

      default byte getByte()
      Returns:
      the entry's value as a byte
    • getByteOrElse

      default byte getByteOrElse(byte defaultValue)
    • getShort

      default short getShort()
      Returns:
      the entry's value as a short
    • getShortOrElse

      default short getShortOrElse(short defaultValue)
    • getChar

      default char getChar()
      If the value is a Number, returns Number.intValue(), cast to char. If the value is a CharSequence, returns its first character. Otherwise, attempts to cast the value to a char.
      Returns:
      the entry's value as a char
    • getCharOrElse

      default char getCharOrElse(char defaultValue)