lev.gui

## Class Setting<T>

- java.lang.Object
- - lev.gui.Setting<T>

- Type Parameters:
    `T` - Type of data being saved.
  Direct Known Subclasses:
    SaveDouble, SaveEnum, SaveStringList

      public abstract class Setting<T>
      extends java.lang.Object

  A class representing a saveable value.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected T` | `data`
    `protected java.lang.Boolean[]` | `extraFlags`
    `protected LUserSetting<T>` | `tie`
    `protected java.lang.String` | `title`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Setting(java.lang.String title_, java.lang.Boolean[] extraFlags)`
    `Setting(java.lang.String title_, T data_, java.lang.Boolean[] extraFlags)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Setting<T>` | `copyOf()`
    `boolean` | `equals(java.lang.Object obj)`
    `T` | `get()`
    `java.lang.Boolean` | `getBool()`
    `java.awt.Color` | `getColor()`
    `java.lang.Object` | `getData()`
    `java.lang.Double` | `getDouble()`
    `java.lang.Enum` | `getEnum()`
    `java.lang.Float` | `getFloat()`
    `java.lang.Integer` | `getInt()`
    `java.lang.String` | `getStr()`
    `java.util.ArrayList<java.lang.String>` | `getStrings()`
    `java.lang.String` | `getTitle()`
    `int` | `hashCode()`
    `java.lang.Boolean` | `isEmpty()`
    `abstract void` | `parse(java.lang.String in)`
    `void` | `readSetting(java.lang.String input)`
    `void` | `set()` Updates the setting to its GUI tie's value
    `void` | `setTo(T input)`
    `void` | `write(java.io.BufferedWriter b)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### data

          protected T data

    - #### title

          protected java.lang.String title

    - #### tie

          protected LUserSetting<T> tie

    - #### extraFlags

          protected java.lang.Boolean[] extraFlags

  - ### Constructor Detail

    - #### Setting

          public Setting(java.lang.String title_,
                 T data_,
                 java.lang.Boolean[] extraFlags)

      Parameters:
        `title_` -
        `data_` -
        `extraFlags` -

    - #### Setting

          public Setting(java.lang.String title_,
                 java.lang.Boolean[] extraFlags)

      Parameters:
        `title_` -
        `extraFlags` -

  - ### Method Detail

    - #### get

          public T get()

      Returns:

    - #### getBool

          public java.lang.Boolean getBool()

      Returns:
        Returns the value as a boolean. Could fail.

    - #### getColor

          public java.awt.Color getColor()

      Returns:

    - #### getEnum

          public java.lang.Enum getEnum()

      Returns:

    - #### getFloat

          public java.lang.Float getFloat()

      Returns:

    - #### getDouble

          public java.lang.Double getDouble()

      Returns:

    - #### getInt

          public java.lang.Integer getInt()

      Returns:
        Returns the value as an int. Could fail.

    - #### getStrings

          public java.util.ArrayList<java.lang.String> getStrings()

      Returns:
        Returns the value as a Set of Strings. Could fail.

    - #### getStr

          public java.lang.String getStr()

      Returns:
        Returns the value as a string. Could fail.

    - #### getData

          public java.lang.Object getData()

      Returns:

    - #### getTitle

          public java.lang.String getTitle()

      Returns:

    - #### set

          public void set()

      Updates the setting to its GUI tie's value

    - #### setTo

          public final void setTo(T input)

      Parameters:
        `input` -

    - #### write

          public void write(java.io.BufferedWriter b)
                     throws java.io.IOException

      Parameters:
        `b` -
      Throws:
        `java.io.IOException`

    - #### readSetting

          public void readSetting(java.lang.String input)
                           throws java.io.IOException

      Parameters:
        `input` -
      Throws:
        `java.io.IOException`

    - #### parse

          public abstract void parse(java.lang.String in)

      Parameters:
        `in` -

    - #### isEmpty

          public java.lang.Boolean isEmpty()

      Returns:

    - #### copyOf

          public abstract Setting<T> copyOf()

      Returns:

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`