Class BaseSequenceManager
java.lang.Object
com.vladsch.flexmark.experimental.util.sequence.managed.BaseSequenceManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NotNull WeakHashMap
<Object, WeakReference<BasedSequence>> private final @NotNull WeakHashMap
<BasedSequence, BaseSequenceEntry> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> @NotNull BasedSequence
getBaseSequence
(T object, @org.jetbrains.annotations.Nullable int[] callTypes, @NotNull Function<T, BasedSequence> factory) Get an equivalent existing based sequence base or a new one created by passed factory
-
Field Details
-
baseMap
-
baseSet
-
-
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 factoryNOTE: should only be called by base sequence which are the base for their category:
SubSequence
implementing managed sequence baseall 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 basecallTypes
- 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 donefactory
- factory to create based sequence from the object- Returns:
- existing equivalent base or newly created base
-