com.fasterxml.jackson.dataformat.javaprop.util

## Class JPropPathSplitter

- java.lang.Object
- - com.fasterxml.jackson.dataformat.javaprop.util.JPropPathSplitter

- Direct Known Subclasses:
    JPropPathSplitter.CharPathOnlySplitter, JPropPathSplitter.FullSplitter, JPropPathSplitter.IndexOnlySplitter, JPropPathSplitter.NonSplitting, JPropPathSplitter.StringPathOnlySplitter

      public abstract class JPropPathSplitter
      extends Object

  Helper class used for splitting a flattened property key into nested/structured path that can be used to traverse and/or define hierarchic structure.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JPropPathSplitter.CharPathOnlySplitter` Simple variant where we only have path separator, and optional "segment is index iff value is integer number"
    `static class` | `JPropPathSplitter.FullSplitter` Instance that supports both path separator and index markers (and possibly also "simple" indexes)
    `static class` | `JPropPathSplitter.IndexOnlySplitter` Special variant that does not use path separator, but does allow index indicator, at the end of path.
    `static class` | `JPropPathSplitter.NonSplitting` "No-op" implementation that does no splitting and simply adds entries as is.
    `static class` | `JPropPathSplitter.StringPathOnlySplitter` Simple variant where we only have path separator, and optional "segment is index iff value is integer number"

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `_useSimpleIndex`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JPropPathSplitter(boolean useSimpleIndex)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected JPropNode` | `_addSegment(JPropNode parent, String segment)`
    `protected int` | `_asInt(String segment)`
    `protected JPropNode` | `_lastSegment(JPropNode parent, String path, int start, int end)`
    `static JPropPathSplitter` | `create(JavaPropsSchema schema)`
    `abstract JPropNode` | `splitAndAdd(JPropNode parent, String key, String value)` Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _useSimpleIndex

          protected final boolean _useSimpleIndex

  - ### Constructor Detail

    - #### JPropPathSplitter

          protected JPropPathSplitter(boolean useSimpleIndex)

  - ### Method Detail

    - #### create

          public static JPropPathSplitter create(JavaPropsSchema schema)

    - #### splitAndAdd

          public abstract JPropNode splitAndAdd(JPropNode parent,
                              String key,
                              String value)

      Main access method for splitting key into one or more segments and using segmentation to add the String value as a node in its proper location.
      Returns:
        Newly added node

    - #### _addSegment

          protected JPropNode _addSegment(JPropNode parent,
                              String segment)

    - #### _lastSegment

          protected JPropNode _lastSegment(JPropNode parent,
                               String path,
                               int start,
                               int end)

    - #### _asInt

          protected int _asInt(String segment)

Copyright © 2017 FasterXML. All rights reserved.