Class BaseSequenceManager

java.lang.Object
com.vladsch.flexmark.experimental.util.sequence.managed.BaseSequenceManager

public class BaseSequenceManager extends Object
  • Field Details

  • Constructor Details

    • BaseSequenceManager

      public BaseSequenceManager()
  • Method Details

    • getBaseSequence

      @NotNull public <T> @NotNull BasedSequence getBaseSequence(@NotNull T object, @Nullable @org.jetbrains.annotations.Nullable int[] callTypes, @NotNull @NotNull Function<T,BasedSequence> factory)
      Get an equivalent existing based sequence base or a new one created by passed factory

      NOTE: should only be called by base sequence which are the base for their category: SubSequence implementing managed sequence base

      all others should delegate to these sequences for creating the base

      Type Parameters:
      T - type of base character sequence
      Parameters:
      object - object for the underlying based sequence base
      callTypes - one element array for type of tests done to find result NOTE: 0 if map lookup, 10 - set search, 20 - construct and add to map/set with units digit giving max testEquals call type from all tests done
      factory - factory to create based sequence from the object
      Returns:
      existing equivalent base or newly created base