Class CfgValue<T>

    • Constructor Detail

      • CfgValue

        public CfgValue​(Object owner,
                        String path,
                        T def)
    • Method Detail

      • value

        public T value()
      • getPath

        public String getPath()
      • getOwner

        public String getOwner()
      • getDefault

        public T getDefault()
      • loadValue

        protected abstract T loadValue()
      • loadValue

        protected abstract T loadValue​(String value)
      • onPreUpdate

        protected void onPreUpdate​(T newValue)
      • onPostUpdate

        protected void onPostUpdate​(T newValue)
      • isOwner

        public boolean isOwner​(Class<?> name)
      • isOwner

        public boolean isOwner​(String name)
      • setValue

        public void setValue​(String v)
      • updateAction

        public <C extends CfgValue<T>> C updateAction​(Consumer<T> consumer)
        Set the onPostUpdate action. The action will be executed on every update.
        Parameters:
        consumer -
        Returns:
        the called object
      • getUpdated

        public long getUpdated()
      • getCalling

        public String getCalling()