Class ArrayPathElement

    • Constructor Detail

      • ArrayPathElement

        public ArrayPathElement​(java.lang.String key)
    • Method Detail

      • getCanonicalForm

        public java.lang.String getCanonicalForm()
        Description copied from interface: PathElement
        Get the canonical form of this PathElement. Really only interesting for the Reference Path element, where it will expand "&" to "&0(0)".
        Specified by:
        getCanonicalForm in interface PathElement
        Returns:
        canonical String version of this PathElement
      • evaluate

        public java.lang.String evaluate​(WalkedPath walkedPath)
        Description copied from interface: EvaluatablePathElement
        Evaluate this key as if it is an write path element.
        Specified by:
        evaluate in interface EvaluatablePathElement
        Parameters:
        walkedPath - "up the tree" list of LiteralPathElements, that may be used by this key as it is computing
        Returns:
        String path element to use for write tree building
      • verifyStringIsNonNegativeInteger

        private static java.lang.String verifyStringIsNonNegativeInteger​(java.lang.String key)
        Returns:
        the String version of a non-Negative integer, else null
      • getExplicitArrayIndex

        public java.lang.Integer getExplicitArrayIndex()
      • isExplicitArrayIndex

        public boolean isExplicitArrayIndex()
      • match

        public MatchedElement match​(java.lang.String dataKey,
                                    WalkedPath walkedPath)
        Description copied from interface: MatchablePathElement
        See if this PathElement matches the given dataKey. If it does not match, this method returns null. If this PathElement does match, it returns a LiteralPathElement with subKeys filled in.
        Specified by:
        match in interface MatchablePathElement
        Parameters:
        dataKey - String key value from the input data
        walkedPath - "up the tree" list of LiteralPathElements, that may be used by this key as it is computing its match
        Returns:
        null or a matched LiteralPathElement