Class TrimSplitByChar

Object
com.owenfeehan.pathpatternfinder.trim.TrimSplitByChar
All Implemented Interfaces:
TrimOperation<String>

public class TrimSplitByChar
extends Object
implements TrimOperation<String>
Attempts to split a string by finding a common special character in all strings.

It then creates two new unresolved elements to the left, and right of the character, as well as a constant element representing the character itself.

Note that we do not perform any case-sensitive matching on the assumption that the characters used in splitChar will typically be special characters for which case is irrelevant.

Author:
Owen Feehan
  • Constructor Details

    • TrimSplitByChar

      public TrimSplitByChar​(char splitChar, int splitCharIndex, UnresolvedPatternElementFactory factoryResolved)
      Constructor
      Parameters:
      splitChar - the character to split with
      splitCharIndex - the index from which the splitChar was found (used to prevent trying to split again characters that have already been rejected)
      factoryResolved - factory for creating unresolved pattern elements
  • Method Details