Class ExtractedElement

Object
com.owenfeehan.pathpatternfinder.patternelements.ExtractedElement

public class ExtractedElement
extends Object
The result of partition a string into two components, one left (prefix) and one right (suffix)
Author:
Owen Feehan
  • Constructor Details

    • ExtractedElement

      public ExtractedElement​(String extracted, String remainder)
      Constructor
      Parameters:
      extracted - left-most part of string
      remainder - right-most part of string
    • ExtractedElement

      public ExtractedElement​(String stringToSplit, int indexSecondPart)
      Alternative constructor where a string is passed, and then split into two by an index
      Parameters:
      stringToSplit - string to split
      indexSecondPart - the starting in index of the second part, so that extracted=[0,indexSecondPart-1] and remainder=[indexSecondPart..]
  • Method Details

    • getExtracted

      public String getExtracted()
      The left-most part of string
      Returns:
      the left-most part of string.
    • getRemainder

      public String getRemainder()
      The right-most part of string
      Returns:
      the right-most part of string.