Class DataKey

java.lang.Object
net.citizensnpcs.api.util.DataKey
Direct Known Subclasses:
MemoryDataKey, YamlStorageWithLists.YamlKey

public abstract class DataKey extends Object
A hierarchical abstract storage class. Similar to Bukkit's ConfigurationSection.
  • Field Details

    • path

      protected final String path
  • Constructor Details

    • DataKey

      protected DataKey(String path)
  • Method Details

    • createRelativeKey

      protected String createRelativeKey(String from)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getBoolean

      public abstract boolean getBoolean(String key)
    • getBoolean

      public boolean getBoolean(String key, boolean value)
    • getDouble

      public abstract double getDouble(String key)
    • getDouble

      public double getDouble(String key, double value)
    • getFromRoot

      public abstract DataKey getFromRoot(String path)
    • getInt

      public abstract int getInt(String key)
    • getInt

      public int getInt(String key, int value)
    • getIntegerSubKeys

      public Iterable<DataKey> getIntegerSubKeys()
    • getLong

      public abstract long getLong(String key)
    • getLong

      public long getLong(String key, long value)
    • getPath

      public String getPath()
    • getRaw

      public abstract Object getRaw(String key)
    • getRawUnchecked

      public <T> T getRawUnchecked(String key)
    • getRelative

      public DataKey getRelative(int key)
    • getRelative

      public abstract DataKey getRelative(String relative)
    • getString

      public abstract String getString(String key)
    • getString

      public String getString(String key, String value)
    • getSubKeys

      public abstract Iterable<DataKey> getSubKeys()
    • getValuesDeep

      public abstract Map<String,Object> getValuesDeep()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • keyExists

      public boolean keyExists()
    • keyExists

      public abstract boolean keyExists(String key)
    • name

      public abstract String name()
    • removeKey

      public abstract void removeKey(String key)
    • sectionToValues

      protected Map<String,Object> sectionToValues(ConfigurationSection section)
    • setBoolean

      public abstract void setBoolean(String key, boolean value)
    • setDouble

      public abstract void setDouble(String key, double value)
    • setInt

      public abstract void setInt(String key, int value)
    • setLong

      public abstract void setLong(String key, long value)
    • setRaw

      public abstract void setRaw(String key, Object value)
    • setString

      public abstract void setString(String key, String value)