Package com.rpl.rama

Interface Path.Impl

All Superinterfaces:
Path
Enclosing interface:
Path

public static interface Path.Impl extends Path
  • Method Details

    • all

      Path.Impl all()
      Navigates to every element of a collection. Works on lists, maps, and sets. For maps navigates to key/value pair with List interface. Value navigator.

      Pseudocode example: select({"a": 1, "b": 2)}, Path.all()) -> [["a", 1], ["b", 2]]

      Pseudocode example: select([1, 2, 3], Path.all()) -> [1, 2, 3]

      For proxies transforms with this navigator produce diffs according to the type of data structure involved. For sequences produces SequenceIndexChangesDiff, SequenceIndexRemoveDiff, or a combination. For sets produces SetAddDiff, SetRemoveDiff, or a combination. For maps produces KeyDiff, KeyRemoveDiff, or a combination. When multiple diffs are produces they are combined with MultiDiff.
    • mapKeys

      Path.Impl mapKeys()
      Navigates to every key of a map. In transforms, changing a key is the same as removing the original key and then adding the updated key with the original value. Value navigator.

      Pseudocode example: select({"a": 1, "b": 2)}, Path.mapKeys()) -> ["a", "b"]

      For proxies transforms with this navigator produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff.
    • mapVals

      Path.Impl mapVals()
      Navigates to every value of a map. Value navigator.

      Pseudocode example: select({"a": 1, "b": 2)}, Path.mapVals()) -> [1, 2]

      For proxies transforms with this navigator produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff.
    • mapKey

      Path.Impl mapKey(Object argKey)
      Navigates to a key in a map if it exists. In transforms, changing the key is the same as removing the original key and then adding the updated key with the original value. This navigator is generally only useful in transforms. Value navigator.

      Pseudocode example: select({"a": 1, "b": 2)}, Path.mapKey("a")) -> ["a"]

      Pseudocode example: select({"a": 1, "b": 2)}, Path.mapKey("c")) -> []

      For proxies transforms with this navigator produce KeyChangeDiff or KeyRemoveDiff.
      Parameters:
      argKey - Key to navigate to
    • subMap

      Path.Impl subMap(Object... argKeys)
      Navigates to a map containing subset of keys/values of starting map. Substructure navigator.

      Pseudocode example: select({"a": 1, "b": 2, "c": 3)}, Path.subMap("a", "c", "d")) -> [{"a": 1, "c": 3}]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argKeys - Keys to select in starting map. Non-existing keys are ignored.
    • must

      Path.Impl must(Object... argKeys)
      Navigates to value for a key in a map only if key exists. If key does not exist, stops navigation. For convenience, can navigate into further nested maps by providing multiple key arguments. Value navigator.

      Example: Path.must("a", "b") is same as Path.must("a").must("b")

      Pseudocode example: select({"a": 1, "b": 2)}, Path.must("a")) -> [1]

      Pseudocode example: select({"a": 1, "b": 2)}, Path.must("c")) -> []

      For proxies transforms with this navigator produce KeyDiff or KeyRemoveDiff.
      Parameters:
      argKeys - Keys to navigate in order
    • key

      Path.Impl key(Object... argKeys)
      Navigates to value for a key in a map. For convenience, can navigate into further nested maps by providing multiple key arguments. Value navigator. Example: Path.key("a", "b") is same as Path.key("a").key("b")

      Pseudocode example: select({"a": 1, "b": 2)}, Path.key("a")) -> [1]

      Pseudocode example: select({"a": 1, "b": 2)}, Path.key("c")) -> [null]

      For proxies transforms with this navigator produce KeyDiff or KeyRemoveDiff.
      Parameters:
      argKeys - Keys to navigate in order
    • sortedSetRange

      Path.Impl sortedSetRange(Object argElemStart, Object argElemEnd)
      Navigates on a sorted set to a sorted set of all values in that set between a range. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRange("a", "d")) -> [sortedSet("a", "b")]

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRange("b", "e")) -> [sortedSet("b", "d")]
      Parameters:
      argElemStart - Start of range, inclusive
      argElemEnd - End of range, exclusive
    • sortedSetRange

      Path.Impl sortedSetRange(Object argElemStart, Object argElemEnd, Object argOptions)
      Navigates on a sorted set to a sorted set of all values in that set between a range, with options to change inclusive/exclusive status of start and end elements. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRange("a", "d", SortedRangeOptions.excludeStart())) -> [sortedSet("b")]

      Pseudocode example: select(sortedSet{"a", "b", "d", "e"}, Path.sortedSetRange("b", "e", SortedRangeOptions.includeEnd())) -> [sortedSet("b", "d", "e")]
      Parameters:
      argElemStart - Start element of range, inclusive unless modified by options
      argElemEnd - End element of range, exclusive unless modified by options
      argOptions - Instance of SortedRangeOptions
    • sortedSetRangeFrom

      Path.Impl sortedSetRangeFrom(Object argElemStart)
      Navigates on a sorted set to a sorted set of all values in that set after an element. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRangeFrom("b")) -> [sortedSet("b", "d")]
      Parameters:
      argElemStart - Start of range, inclusive
    • sortedSetRangeFrom

      Path.Impl sortedSetRangeFrom(Object argElemStart, Object argAmtOrOptions)
      Navigates on a sorted set to a sorted set starting from a specified element, with options to read a fixed number of elements or configure whether start element is inclusive or exclusive. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRangeFrom("a", 2)) -> [sortedSet("a", "b")]

      Pseudocode example: select(sortedSet{"a", "b", "d", "e"}, Path.sortedSetRangeFrom("a", SortedRangeFromOptions.excludeStart().maxAmt(2))) -> [sortedSet("b", "d")]
      Parameters:
      argElemStart - Start of range, inclusive unless modified by options
      argAmtOrOptions - Either a number indicating maximum number of elements to include in result or an instance of SortedRangeFromOptions
    • sortedSetRangeFromStart

      Path.Impl sortedSetRangeFromStart(Object argMaxAmt)
      Navigates on a sorted set to a sorted set of all values in that set after the start up to the provided max amount. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRangeFromStart(2)) -> [sortedSet("a", "b")]
      Parameters:
      argMaxAmt - Maximum number of entries to return
    • sortedSetRangeTo

      Path.Impl sortedSetRangeTo(Object argElemTo)
      Navigates on a sorted set to a sorted set of all values in that set up to an element. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRangeTo("d")) -> [sortedSet("a", "b")]
      Parameters:
      argElemTo - End of range, exclusive
    • sortedSetRangeTo

      Path.Impl sortedSetRangeTo(Object argElemTo, Object argAmtOrOptions)
      Navigates on a sorted set to a sorted set up to a specified element, with options to read a fixed number of elements or configure whether end element is inclusive or exclusive. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d", "e"}, Path.sortedSetRangeTo("e", 2)) -> [sortedSet("b", "d")]

      Pseudocode example: select(sortedSet{"a", "b", "d", "e"}, Path.sortedSetRangeTo("e", SortedRangeToOptions.includeEnd().maxAmt(2))) -> [sortedSet("d", "e")]

      Pseudocode example: select(sortedSet{"a", "b", "d", "e"}, Path.sortedSetRangeTo("b", SortedRangeToOptions.includeEnd())) -> [sortedSet("a", "b")]
      Parameters:
      argElemTo - End of range, exclusive unless modified by options
      argAmtOrOptions - Either a number indicating maximum number of elements to include in result or an instance of SortedRangeToOptions
    • sortedSetRangeToEnd

      Path.Impl sortedSetRangeToEnd(Object argMaxAmt)
      Navigates on a sorted set to a sorted set of all values in that set from the end, up to the provided max amount. Useful on subindexed sets. Substructure navigator.

      Pseudocode example: select(sortedSet{"a", "b", "d"}, Path.sortedSetRangeToEnd(2)) -> [sortedSet("b", "d")]
      Parameters:
      argMaxAmt - Maximum number of entries to return
    • sortedMapRange

      Path.Impl sortedMapRange(Object argKeyStart, Object argKeyEnd)
      Navigates on a sorted map to a sorted map of all elements in that map between a range of keys. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRange("a", "d")) -> [sortedMap("a": 1, "b": 2)]

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRange("b", "e")) -> [sortedMap{"b": 2, "d": 4})]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argKeyStart - Start key of range, inclusive
      argKeyEnd - End key of range, exclusive
    • sortedMapRange

      Path.Impl sortedMapRange(Object argKeyStart, Object argKeyEnd, Object argOptions)
      Navigates on a sorted map to a sorted map of all elements in that map between a range of keys, with options to change inclusive/exclusive status of start and end keys. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRange("a", "d", SortedRangeOptions.excludeStart())) -> [sortedMap("b": 2)]

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRange("b", "d", SortedRangeOptions.includeEnd())) -> [sortedMap{"b": 2, "d": 4})]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argKeyStart - Start key of range, inclusive unless modified by options
      argKeyEnd - End key of range, exclusive unless modified by options
      argOptions - Instance of SortedRangeOptions
    • sortedMapRangeFrom

      Path.Impl sortedMapRangeFrom(Object argKeyStart)
      Navigates on a sorted map to a sorted map of all elements in that map after a key. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRangeFrom("b")) -> [sortedMap("b": 2, "d": 4)]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argKeyStart - Start key of range, inclusive
    • sortedMapRangeFrom

      Path.Impl sortedMapRangeFrom(Object argKeyStart, Object argAmtOrOptions)
      Navigates on a sorted map to a sorted map starting from a specified key, with options to read a fixed number of elements or configure whether start key is inclusive or exclusive. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRangeFrom("a", 2)) -> [sortedMap("a": 1, "b": 2)]

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4, "e": 5}, Path.sortedMapRangeFrom("a", SortedRangeFromOptions.excludeStart().maxAmt(2))) -> [sortedMap("b": 2, "d": 4)]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argKeyStart - Start key of range, inclusive
      argAmtOrOptions - Either a number indicating maximum number of elements to include in result or an instance of SortedRangeFromOptions
    • sortedMapRangeFromStart

      Path.Impl sortedMapRangeFromStart(Object argMaxAmt)
      Navigates on a sorted map to a sorted map of all elements in that map from the start up to the provided max amount. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRangeFromStart(2)) -> [sortedMap("a": 1, "b": 2)]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argMaxAmt - Maximum number of entries to return
    • sortedMapRangeTo

      Path.Impl sortedMapRangeTo(Object argKeyTo)
      Navigates on a sorted map to a sorted map of all values in that map up to a key. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRangeTo("d")) -> [sortedMap("a": 1, "b": 2)]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argKeyTo - End key of range, exclusive
    • sortedMapRangeTo

      Path.Impl sortedMapRangeTo(Object argKeyTo, Object argAmtOrOptions)
      Navigates on a sorted map to a sorted map up to a specified key, with options to read a fixed number of elements or configure whether end key is inclusive or exclusive. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4, "e": 5}, Path.sortedMapRangeTo("e", 2)) -> [sortedMap("b": 2, "d": 4)]

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4, "e": 5}, Path.sortedMapRangeTo("e", SortedRangeToOptions.includeEnd().maxAmt(2))) -> [sortedMap("d": 4, "e": 5)]

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4, "e": 5}, Path.sortedMapRangeTo("b", SortedRangeToOptions.includeEnd())) -> [sortedMap("a": 1, "b": 2)]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argKeyTo - End key of range, exclusive unless modified by options
      argAmtOrOptions - Either a number indicating maximum number of elements to include in result or an instance of SortedRangeToOptions
    • sortedMapRangeToEnd

      Path.Impl sortedMapRangeToEnd(Object argMaxAmt)
      Navigates on a sorted map to a sorted map of all elements in that map from the end up to the provided max amount. Useful on subindexed maps. Substructure navigator.

      Pseudocode example: select(sortedMap{"a": 1, "b": 2, "d": 4}, Path.sortedMapRangeFromStart(2)) -> [sortedMap("b": 1, "d": 2)]

      For proxies transforms with this navigator that do fine-grained updates to the submap produce KeysRemoveDiff, KeysDiff, or a combination of the two with MultiDiff. If the submap is modified in a coarse-grained way (e.g. overridden completely with Path.termVal(java.lang.Object)), this navigator will produce a NewValueDiff.
      Parameters:
      argMaxAmt - Maximum number of entries to return
    • afterElem

      Path.Impl afterElem()
      Navigates on a list to void element at end. Used in transforms to append a single element. Virtual value navigator.

      Pseudocode example: transform([1, 2], Path.afterElem().termVal(4)) -> [1, 2, 4]

      For proxies transforms with this navigator produce SequenceInsertDiff.
    • beforeElem

      Path.Impl beforeElem()
      Navigates on a list to void element at beginning. Used in transforms to prepend a single element. Virtual value navigator.

      Pseudocode example: transform([1, 2], Path.beforeElem().termVal(4)) -> [4, 1, 2]

      For proxies transforms with this navigator produce SequenceInsertDiff.
    • beginning

      Path.Impl beginning()
      Navigates on a list to empty subsequence at beginning. Used in transforms to prepend multiple elements. Substructure navigator.

      Pseudocode example: transform([1, 2], Path.beginning().termVal([3, 4])) -> [3, 4, 1, 2]

      For proxies transforms with this navigator produce SequenceInsertsDiff.
    • end

      Path.Impl end()
      Navigates on a list to empty subsequence at end. Used in transforms to append multiple elements. Substructure navigator.

      Pseudocode example: transform([1, 2], Path.end().termVal([3, 4])) -> [1, 2, 3, 4]

      For proxies transforms with this navigator produce SequenceInsertsDiff.
    • first

      Path.Impl first()
      Navigates on list to first element if not empty. If empty, stops navigation. Value navigator.

      Pseudocode example: select([1, 2, 3], Path.first()) -> [1]

      Pseudocode example: select([], Path.first()) -> []

      For proxies transforms with this navigator produce SequenceIndexChangeDiff or SequenceIndexRemoveDiff.
    • last

      Path.Impl last()
      Navigates on list to last element if not empty. If empty, stops navigation. Value navigator.

      Pseudocode example: select([1, 2, 3], Path.last()) -> [3]

      Pseudocode example: select([], Path.last()) -> []

      For proxies transforms with this navigator produce SequenceIndexChangeDiff or SequenceIndexRemoveDiff.
    • indexedVals

      Path.Impl indexedVals()
      Navigates to pairs of [index, value] for every element of list. Pairs are represented as lists of two elements. Transforms should produce new [index, value] pairs. Changing an index in a transform will move the element in the resulting list. Value navigator.

      Pseudocode example: select([1, 2, 3], Path.indexedVals()) -> [[0, 1], [1, 2], [2, 3]]

      Pseudocode example: transform([1, 2, 3, 4], Path.indexedVals().first().termVal(0)) -> [4, 3, 2, 1]
    • beforeIndex

      Path.Impl beforeIndex(Object argIndex)
      Navigates on list to void element before an index. Used in transforms to insert an element in middle of list. Virtual value navigator.

      Pseudocode example: transform([1, 2, 3], Path.beforeIndex(2).termVal(0)) -> [1, 2, 0, 3]

      For proxies transforms with this navigator produce SequenceInsertDiff.
      Parameters:
      argIndex - Index of list
    • filteredList

      Path.Impl filteredList(Path path)
      Navigates to sublist of elements filtered based on given Path. An element is included in sublist if path applied to that element navigates to at least one value. Transforms on sublist will modify the locations in the original list. Substructure navigator.

      Pseudocode example: select([1, 2, 3, 4, 5], Path.filteredList(Path.filterPred(Ops.IS_ODD))) -> [1, 3, 5]

      Pseudocode example: transform([1, 2, 3, 4, 5], Path.filteredList(Path.filterPred(Ops.IS_ODD)).term(Ops.INC)) -> [2, 2, 4, 4, 6]

      For proxies transforms with this navigator produce diffs according to rest of transform path.
      Parameters:
      path - Subpath evaluated on each element of list
    • index

      Path.Impl index(Object argIndex)
      Navigates to the index of a list if it exists. This navigates to the index, not to the value at that index. Changing the index in a transform will move the element in the resulting list. Value navigator.

      Pseudocode example: select([1, 2, 3], Path.index(1)) -> [1]

      Pseudocode example: select([1, 2, 3], Path.index(9)) -> []

      Pseudocode example: transform([1, 2, 3], Path.index(0).termVal(2)) -> [2, 3, 1]

      For proxies transforms with this navigator produce SequenceReorderDiff.
      Parameters:
      argIndex - Index of list
    • nth

      Path.Impl nth(Object argIndex)
      Navigates to value for index in a list. Value navigator.

      Pseudocode example: select([1, 2, 3], Path.nth(1)) -> [2]

      For proxies transforms with this navigator produce SequenceIndexChangeDiff or SequenceIndexRemoveDiff.
      Parameters:
      argIndex - Index of list
    • sublist

      Path.Impl sublist(Object argStartIndex, Object argEndIndex)
      Navigates to sublist bounded by two indexes. Substructure navigator.

      Pseudocode example: select([1, 2, 3, 4], Path.sublist(2, 4)) -> [[2, 3]]

      Pseudocode example: transform([1, 2, 3, 4], Path.sublist(2, 4).termVal(null)) -> [1, 4]

      For proxies transforms with this navigator produce sequence diffs according to the rest of the transform path.
      Parameters:
      argStartIndex - Start index of range, inclusive
      argEndIndex - End index of range, exclusive
    • sublistDynamic

      <T0, R0, T1, T2, R1> Path.Impl sublistDynamic(RamaFunction1<T0,R0> startFunction, RamaFunction2<T1,T2,R1> endFunction)
      Navigates to sublist bounded by indexes chosen by functions. Substructure navigator.

      For proxies transforms with this navigator produce sequence diffs according to the rest of the transform path.
      Parameters:
      startFunction - Receives list as input and returns start index (inclusive)
      endFunction - Receives list and start index as input and returns end index (exclusive)
    • voidSetElem

      Path.Impl voidSetElem()
      Navigates to void element of set. Used to add a single element to a set in transforms. Virtual value navigator.

      For proxies transforms with this navigator produce SetAddDiff.

      Pseudocode example: transform(set{1, 2}, Path.voidSetElem().termVal(5)) -> set{1, 2, 5}
    • setElem

      Path.Impl setElem(Object argVal)
      Navigates to element of set if it exists. If element does not exist, stops navigation. Value navigator.

      Pseudocode example: select(set{1, 2}, Path.setElem(1)) -> [1]

      Pseudocode example: select(set{1, 2}, Path.setElem(13)) -> []

      Pseudocode example: transform(set{1, 2}, Path.setElem(1).termVal(3)) -> set{2, 3}

      For proxies transforms with this navigator produce SetAddDiff, SetRemoveDiff, or a combination with MultiDiff.
      Parameters:
      argVal - Set element
    • subset

      Path.Impl subset(Object... argVals)
      Navigates to subset of starting set with given elements. Substructure navigator.

      Pseudocode example: select(set{1, 2, 3}, Path.subset(1, 3, 4)) -> [set{1, 3}]

      For proxies transforms with this navigator produce SetAddDiff, SetRemoveDiff, or a combination with MultiDiff.
      Parameters:
      argVals - Elements to select in starting set. Non-existing elements are ignored.
    • nullToList

      Path.Impl nullToList()
      Navigates to empty list if currently navigated to null. Otherwise, stays navigated at current location. View navigator.

      Pseudocode example: select(null, Path.nullToList()) -> [[]]

      Pseudocode example: select(3, Path.nullToList()) -> [3]

      Pseudocode example: transform(null, Path.nullToList().term(Ops.IDENTITY)) -> []

      For proxies transforms with this navigator produce diffs depending on if original value was null. If null, produces NewValueDiff. Otherwise produces diffs according to rest of transform path.
    • nullToSet

      Path.Impl nullToSet()
      Navigates to empty set if currently navigated to null. Otherwise, stays navigated at current location. View navigator.

      Pseudocode example: select(null, Path.nullToSet()) -> [set{}]

      Pseudocode example: select(3, Path.nullToSet()) -> [3]

      Pseudocode example: transform(null, Path.nullToSet().term(Ops.IDENTITY)) -> set{}

      For proxies transforms with this navigator produce diffs depending on if original value was null. If null, produces NewValueDiff. Otherwise produces diffs according to rest of transform path.
    • nullToVal

      Path.Impl nullToVal(Object argVal)
      Navigates to given value if currently navigated to null. Otherwise, stays navigated at current location. View navigator.

      Pseudocode example: select(null, Path.nullToVal(1)) -> [1]

      Pseudocode example: select(3, Path.nullToVal(1)) -> [3]

      Pseudocode example: transform(null, Path.nullToVal(1).term(Ops.IDENTITY)) -> 1

      For proxies transforms with this navigator produce diffs depending on if original value was null. If null, produces NewValueDiff. Otherwise produces diffs according to rest of transform path.
      Parameters:
      argVal - Value to navigate to if currently navigated to null
    • transformed

      Path.Impl transformed(Path path)
      Navigates to transformation of current value with given path. View navigator.

      Pseudocode example: select([1, 2, 3], Path.transformed(Path.all().term(Ops.INC))) -> [[2, 3, 4]]

      For proxies transforms with this navigator produce a combination of diffs from execution of path and the rest of the transform path.
      Parameters:
      path - Transform path
    • collect

      Path.Impl collect(Path path)
      Collects a list of values selected with given path from current point.
      Parameters:
      path - Path to use for select
      See Also:
    • collectOne

      Path.Impl collectOne(Path path)
      Collects a single value selected with given path from current point. Exception if path selects zero values or more than one value.
      Parameters:
      path - Path to use for select
      See Also:
    • putCollected

      Path.Impl putCollected(Object argVal)
      Adds given value to collected values.
      Parameters:
      argVal - Value to add
      See Also:
    • isCollected

      <T0, R0> Path.Impl isCollected(RamaFunction1<T0,R0> predicate)
      Stops navigation if given function on collected values returns false. Otherwise, stays navigated at current point. Filter navigator.
      Parameters:
      predicate - Function receiving list of collected values and returning true or false
      See Also:
    • dispenseCollected

      Path.Impl dispenseCollected()
      Drops all collected values from subsequent navigation
      See Also:
    • stay

      Path.Impl stay()
      No-op that stays navigated at current point. Control navigator.

      Pseudocode example: select(2, Path.stay()) -> [2]
    • stop

      Path.Impl stop()
      Stops current branch of navigation. Control navigator.

      Pseudocode example: select(2, Path.stop()) -> []
    • ifPath

      Path.Impl ifPath(Path conditionPath, Path thenPath)
      Tests condition against current point and continues navigating with thenPath if condition passes. Condition passes if it navigates to at least one value. If condition fails, this branch of navigation stops. Control navigator.
      Parameters:
      conditionPath - Condition path
      thenPath - Path used if condition passes
      See Also:
    • ifPath

      Path.Impl ifPath(Path conditionPath, Path thenPath, Path elsePath)
      Tests condition against current point and continues navigating with thenPath if condition passes. Condition passes if it navigates to at least one value. If condition fails, continues navigating with elsePath. Control navigator.
      Parameters:
      conditionPath - Condition path
      thenPath - Path used if condition passes
      elsePath - Path used if condition fails
      See Also:
    • multiPath

      Path.Impl multiPath(Path... paths)
      Navigates to each provided path in order, all starting from this point. Control navigator.

      Pseudocode example: select({"a": 1, "b": 2}, Path.multiPath(Path.key("a"), Path.key("b"))) -> [1, 2]

      For proxies transforms with this navigator produce MultiDiff.
      Parameters:
      paths - Sequence of paths to execute
      See Also:
    • subselect

      Path.Impl subselect(Path path)
      Navigates to list of values navigated by provided path. Transforms on that list will update original locations of each value, no matter how nested. Control navigator.

      For proxies transforms with this navigator produce diffs according to rest of transform path.
      Parameters:
      path - Subpath
      See Also:
    • filterPred

      <T0, R0> Path.Impl filterPred(RamaFunction1<T0,R0> pred)
      Continues navigation if provided function returns true on current value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select(2, Path.filterPred(Ops.IS_EVEN)) -> [2]

      Pseudocode example: select(1, Path.filterPred(Ops.IS_EVEN)) -> []
      Parameters:
      pred - Test function
    • filterEqual

      Path.Impl filterEqual(Object argVal)
      Continues navigation if current value is equal to provided value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select(2, Path.filterEqual(2)) -> [2]

      Pseudocode example: select(1, Path.filterEqual(2)) -> []
      Parameters:
      argVal - Test value
    • filterNotEqual

      Path.Impl filterNotEqual(Object argVal)
      Continues navigation if current value is not equal to provided value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select(2, Path.filterNotEqual(2)) -> []

      Pseudocode example: select(1, Path.filterNotEqual(2)) -> [1]
      Parameters:
      argVal - Test value
    • filterLessThan

      Path.Impl filterLessThan(Object argVal)
      Continues navigation if current value is less than provided value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select(2, Path.filterLessThan(2)) -> []

      Pseudocode example: select(1, Path.filterLessThan(2)) -> [1]
      Parameters:
      argVal - Test value
    • filterLessThanOrEqual

      Path.Impl filterLessThanOrEqual(Object argVal)
      Continues navigation if current value is less than or equal to provided value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select(2, Path.filterLessThanOrEqual(1)) -> []

      Pseudocode example: select(2, Path.filterLessThanOrEqual(2)) -> [2]

      Pseudocode example: select(2, Path.filterLessThanOrEqual(4)) -> [2]
      Parameters:
      argVal - Test value
    • filterGreaterThan

      Path.Impl filterGreaterThan(Object argVal)
      Continues navigation if current value is greater than provided value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select(2, Path.filterGreaterThan(2)) -> []

      Pseudocode example: select(3, Path.filterGreaterThan(2)) -> [3]
      Parameters:
      argVal - Test value
    • filterGreaterThanOrEqual

      Path.Impl filterGreaterThanOrEqual(Object argVal)
      Continues navigation if current value is greater than or equal to provided value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select(2, Path.filterLessThanOrEqual(1)) -> [2]

      Pseudocode example: select(2, Path.filterLessThanOrEqual(2)) -> [2]

      Pseudocode example: select(2, Path.filterLessThanOrEqual(4)) -> []
      Parameters:
      argVal - Test value
    • filterSelected

      Path.Impl filterSelected(Path path)
      Continues navigation if provided path executed on current value navigates to at least one value. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select([1, 2, 3], Path.filterSelected(Path.all().filterPred(Ops.IS_EVEN))) -> [[1, 2, 3]]

      Pseudocode example: select([1, 3, 5], Path.filterSelected(Path.all().filterPred(Ops.IS_EVEN))) -> []
      Parameters:
      path - Condition path
    • filterNotSelected

      Path.Impl filterNotSelected(Path path)
      Continues navigation if provided path executed on current value navigates to zero values. Otherwise, stops current branch of navigation. Filter navigator.

      Pseudocode example: select([1, 2, 3], Path.filterNotSelected(Path.all().filterPred(Ops.IS_EVEN))) -> []

      Pseudocode example: select([1, 3, 5], Path.filterNotSelected(Path.all().filterPred(Ops.IS_EVEN))) -> [[1, 3, 5]]
      Parameters:
      path - Condition path
    • withPageSize

      Path.Impl withPageSize(Object argPageSize, Path path)
      Pagination done by navigators in subpath use the specified page size. Can only be used in yielding selects.
      Parameters:
      argPageSize - Page size
      path - Subpath
    • termVal

      Path.Impl termVal(Object argVal)
      Terminal point of a transform path that overrides navigated value to provided value
      See Also:
    • termVoid

      Path.Impl termVoid()
      Terminal point of a transform path that sets navigated value to void, causing it to be removed.

      For proxies transforms with this navigator produce NewValueDiff.
      See Also:
    • customNav

      Path.Impl customNav(Navigator nav)
      Adds custom navigator implementation to Path
      See Also:
    • view

      <T0, R0> Path.Impl view(RamaFunction1<T0,R0> viewFunction)
      Navigates to result of applying given function to current value. View navigator.

      Pseudocode example: select(2, Path.view(Ops.INC)) -> [3]

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply
    • view

      <T0, T1, R0> Path.Impl view(RamaFunction2<T0,T1,R0> viewFunction, Object arg1)
      Navigates to result of applying given function to current value and provided arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to view.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply of two arguments
    • view

      <T0, T1, T2, R0> Path.Impl view(RamaFunction3<T0,T1,T2,R0> viewFunction, Object arg1, Object arg2)
      Navigates to result of applying given function to current value and provided arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to view.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply of three arguments
    • view

      <T0, T1, T2, T3, R0> Path.Impl view(RamaFunction4<T0,T1,T2,T3,R0> viewFunction, Object arg1, Object arg2, Object arg3)
      Navigates to result of applying given function to current value and provided arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to view.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply of four arguments
    • view

      <T0, T1, T2, T3, T4, R0> Path.Impl view(RamaFunction5<T0,T1,T2,T3,T4,R0> viewFunction, Object arg1, Object arg2, Object arg3, Object arg4)
      Navigates to result of applying given function to current value and provided arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to view.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply of five arguments
    • view

      <T0, T1, T2, T3, T4, T5, R0> Path.Impl view(RamaFunction6<T0,T1,T2,T3,T4,T5,R0> viewFunction, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
      Navigates to result of applying given function to current value and provided arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to view.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply of six arguments
    • view

      <T0, T1, T2, T3, T4, T5, T6, R0> Path.Impl view(RamaFunction7<T0,T1,T2,T3,T4,T5,T6,R0> viewFunction, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)
      Navigates to result of applying given function to current value and provided arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to view.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply of seven arguments
    • view

      <T0, T1, T2, T3, T4, T5, T6, T7, R0> Path.Impl view(RamaFunction8<T0,T1,T2,T3,T4,T5,T6,T7,R0> viewFunction, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
      Navigates to result of applying given function to current value and provided arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to view.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      viewFunction - Function to apply of eight arguments
    • customNavBuilder

      Path.Impl customNavBuilder(RamaFunction0<Navigator> builderFunction)
      Adds a custom navigator built dynamically with the provided function of zero arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of zero arguments
      See Also:
    • customNavBuilder

      <T0> Path.Impl customNavBuilder(RamaFunction1<T0,Navigator> builderFunction, Object arg0)
      Adds a custom navigator built dynamically with the provided function of one argument. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of one argument
      See Also:
    • customNavBuilder

      <T0, T1> Path.Impl customNavBuilder(RamaFunction2<T0,T1,Navigator> builderFunction, Object arg0, Object arg1)
      Adds a custom navigator built dynamically with the provided function of two arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of two arguments
      See Also:
    • customNavBuilder

      <T0, T1, T2> Path.Impl customNavBuilder(RamaFunction3<T0,T1,T2,Navigator> builderFunction, Object arg0, Object arg1, Object arg2)
      Adds a custom navigator built dynamically with the provided function of three arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of three arguments
      See Also:
    • customNavBuilder

      <T0, T1, T2, T3> Path.Impl customNavBuilder(RamaFunction4<T0,T1,T2,T3,Navigator> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3)
      Adds a custom navigator built dynamically with the provided function of four arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of four arguments
      See Also:
    • customNavBuilder

      <T0, T1, T2, T3, T4> Path.Impl customNavBuilder(RamaFunction5<T0,T1,T2,T3,T4,Navigator> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
      Adds a custom navigator built dynamically with the provided function of five arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of five arguments
      See Also:
    • customNavBuilder

      <T0, T1, T2, T3, T4, T5> Path.Impl customNavBuilder(RamaFunction6<T0,T1,T2,T3,T4,T5,Navigator> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
      Adds a custom navigator built dynamically with the provided function of six arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of six arguments
      See Also:
    • customNavBuilder

      <T0, T1, T2, T3, T4, T5, T6> Path.Impl customNavBuilder(RamaFunction7<T0,T1,T2,T3,T4,T5,T6,Navigator> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)
      Adds a custom navigator built dynamically with the provided function of seven arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of seven arguments
      See Also:
    • customNavBuilder

      <T0, T1, T2, T3, T4, T5, T6, T7> Path.Impl customNavBuilder(RamaFunction8<T0,T1,T2,T3,T4,T5,T6,T7,Navigator> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
      Adds a custom navigator built dynamically with the provided function of eight arguments. Additional arguments to customNavBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Navigator builder function of eight arguments
      See Also:
    • pathBuilder

      Path.Impl pathBuilder(RamaFunction0<Path> builderFunction)
      Concatenates a path to the current path constructed with the provided function of zero arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of zero arguments
    • pathBuilder

      <T0> Path.Impl pathBuilder(RamaFunction1<T0,Path> builderFunction, Object arg0)
      Concatenates a path to the current path constructed with the provided function of one argument. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of one argument
    • pathBuilder

      <T0, T1> Path.Impl pathBuilder(RamaFunction2<T0,T1,Path> builderFunction, Object arg0, Object arg1)
      Concatenates a path to the current path constructed with the provided function of two arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of two arguments
    • pathBuilder

      <T0, T1, T2> Path.Impl pathBuilder(RamaFunction3<T0,T1,T2,Path> builderFunction, Object arg0, Object arg1, Object arg2)
      Concatenates a path to the current path constructed with the provided function of three arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of three arguments
    • pathBuilder

      <T0, T1, T2, T3> Path.Impl pathBuilder(RamaFunction4<T0,T1,T2,T3,Path> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3)
      Concatenates a path to the current path constructed with the provided function of four arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of four arguments
    • pathBuilder

      <T0, T1, T2, T3, T4> Path.Impl pathBuilder(RamaFunction5<T0,T1,T2,T3,T4,Path> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
      Concatenates a path to the current path constructed with the provided function of five arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of five arguments
    • pathBuilder

      <T0, T1, T2, T3, T4, T5> Path.Impl pathBuilder(RamaFunction6<T0,T1,T2,T3,T4,T5,Path> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
      Concatenates a path to the current path constructed with the provided function of six arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of six arguments
    • pathBuilder

      <T0, T1, T2, T3, T4, T5, T6> Path.Impl pathBuilder(RamaFunction7<T0,T1,T2,T3,T4,T5,T6,Path> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)
      Concatenates a path to the current path constructed with the provided function of seven arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of seven arguments
    • pathBuilder

      <T0, T1, T2, T3, T4, T5, T6, T7> Path.Impl pathBuilder(RamaFunction8<T0,T1,T2,T3,T4,T5,T6,T7,Path> builderFunction, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
      Concatenates a path to the current path constructed with the provided function of eight arguments. Additional arguments to pathBuilder after the first are passed to the provided function at runtime.
      Parameters:
      builderFunction - Path builder function of eight arguments
    • term

      <T0, R0> Path.Impl term(RamaFunction1<T0,R0> termFunction)
      Terminal point of a transform path that updates navigated value with the provided function of one argument.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function on navigated value
      See Also:
    • term

      <T0, T1, R0> Path.Impl term(RamaFunction2<T0,T1,R0> termFunction, Object arg1)
      Terminal point of a transform path that updates navigated value with the provided function of two arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to term.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function of two arguments
      See Also:
    • term

      <T0, T1, T2, R0> Path.Impl term(RamaFunction3<T0,T1,T2,R0> termFunction, Object arg1, Object arg2)
      Terminal point of a transform path that updates navigated value with the provided function of three arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to term.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function of three arguments
      See Also:
    • term

      <T0, T1, T2, T3, R0> Path.Impl term(RamaFunction4<T0,T1,T2,T3,R0> termFunction, Object arg1, Object arg2, Object arg3)
      Terminal point of a transform path that updates navigated value with the provided function of four arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to term.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function of four arguments
      See Also:
    • term

      <T0, T1, T2, T3, T4, R0> Path.Impl term(RamaFunction5<T0,T1,T2,T3,T4,R0> termFunction, Object arg1, Object arg2, Object arg3, Object arg4)
      Terminal point of a transform path that updates navigated value with the provided function of five arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to term.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function of five arguments
      See Also:
    • term

      <T0, T1, T2, T3, T4, T5, R0> Path.Impl term(RamaFunction6<T0,T1,T2,T3,T4,T5,R0> termFunction, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
      Terminal point of a transform path that updates navigated value with the provided function of six arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to term.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function of six arguments
      See Also:
    • term

      <T0, T1, T2, T3, T4, T5, T6, R0> Path.Impl term(RamaFunction7<T0,T1,T2,T3,T4,T5,T6,R0> termFunction, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)
      Terminal point of a transform path that updates navigated value with the provided function of seven arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to term.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function of seven arguments
      See Also:
    • term

      <T0, T1, T2, T3, T4, T5, T6, T7, R0> Path.Impl term(RamaFunction8<T0,T1,T2,T3,T4,T5,T6,T7,R0> termFunction, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
      Terminal point of a transform path that updates navigated value with the provided function of eight arguments. The first argument will be the navigated value, and remaining arguments will be additional arguments provided to term.

      For proxies transforms with this navigator produce NewValueDiff.
      Parameters:
      termFunction - Transform function of eight arguments
      See Also: