Interface ConfigurationTransformation.Versioned

    • Field Detail

      • VERSION_UNKNOWN

        static final int VERSION_UNKNOWN
        Indicates a node with an unknown version.

        This can be returned as the latest version.

        Since:
        4.0.0
        See Also:
        Constant Field Values
    • Method Detail

      • versionKey

        NodePath versionKey()
        Get the path the node's current version is located at.
        Returns:
        version path
        Since:
        4.0.0
      • latestVersion

        int latestVersion()
        Get the latest version that nodes can be updated to.
        Returns:
        the most recent version
        Since:
        4.0.0
      • version

        default int version​(ConfigurationNode node)
        Get the version of a node hierarchy.

        Note that the node checked here must be the same node passed to ConfigurationTransformation.apply(ConfigurationNode), not any node in a hierarchy.

        If the node value is not present or not coercible to an integer, VERSION_UNKNOWN will be returned. When the transformation is executed, every version transformation will be applied.

        Parameters:
        node - node to check
        Returns:
        version, or VERSION_UNKNOWN if no value is present
        Since:
        4.0.0