Class UnmodifiableConfigWrapper<C extends UnmodifiableConfig>

    • Constructor Detail

      • UnmodifiableConfigWrapper

        protected UnmodifiableConfigWrapper​(C config)
    • Method Detail

      • getRaw

        public <T> T getRaw​(java.util.List<java.lang.String> path)
        Description copied from interface: UnmodifiableConfig
        Gets a value from the config. Doesn't convert NullObject.NULL_OBJECT to null.
        Specified by:
        getRaw in interface UnmodifiableConfig
        Type Parameters:
        T - the value's type
        Parameters:
        path - the value's path, each element of the list is a different part of the path.
        Returns:
        the value at the given path, or null if there is no such value.
      • valueMap

        public java.util.Map<java.lang.String,​java.lang.Object> valueMap()
        Description copied from interface: UnmodifiableConfig
        Returns a Map view of the config's values. If the config is unmodifiable then the returned map is unmodifiable too.
        Specified by:
        valueMap in interface UnmodifiableConfig
        Returns:
        a Map view of the config's values.
      • entrySet

        public java.util.Set<? extends UnmodifiableConfig.Entry> entrySet()
        Description copied from interface: UnmodifiableConfig
        Returns a Set view of the config's entries. If the config is unmodifiable then the returned set is unmodifiable too.
        Specified by:
        entrySet in interface UnmodifiableConfig
        Returns:
        a Set view of the config's entries.
      • contains

        public boolean contains​(java.util.List<java.lang.String> path)
        Description copied from interface: UnmodifiableConfig
        Checks if the config contains a value at some path.
        Specified by:
        contains in interface UnmodifiableConfig
        Parameters:
        path - the path to check, each element of the list is a different part of the path.
        Returns:
        true if the path is associated with a value, false if it's not.
      • size

        public int size()
        Description copied from interface: UnmodifiableConfig
        Gets the size of the config.
        Specified by:
        size in interface UnmodifiableConfig
        Returns:
        the number of top-level elements in the config.
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: UnmodifiableConfig
        Checks if the config is empty.
        Specified by:
        isEmpty in interface UnmodifiableConfig
        Returns:
        true if the config is empty, false if it contains at least one element.
      • 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