SequenceMatcher<T> class
Low-level algorithm to compute match blocks, transformation operations, and similarities between a source and a target collection.
Constructors
-
SequenceMatcher({Iterable<
T> ? source, Iterable<T> ? target, Predicate1<T> ? isJunk, bool autoJunk = true})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
matches
→ Iterable<
Match> -
Return list of blocks describing matching subsequences.
no setter
-
operations
→ Iterable<
Operation> -
Returns a sequence of operations describing how to turn source into
target.
no setter
- quickRatio → double
-
Return an upper bound on ratio relatively quickly.
no setter
- ratio → double
-
Return a measure of the sequences' similarity, that is 1.0 if the
sequences are identical, and 0.0 if the sequences have nothing in
common.
no setter
- realQuickRatio → double
-
Return an upper bound on ratio really quickly.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
source
↔ Iterable<
T> -
Returns the source iterable.
getter/setter pair
-
target
↔ Iterable<
T> -
Returns the target iterable.
getter/setter pair
-
targetJunk
→ Iterable<
T> -
Returns an iterable over the junk entries in target.
no setter
-
targetPopular
→ Iterable<
T> -
Returns an iterable over the popular entries in target.
no setter
Methods
-
findLongestMatch(
{int sourceStart = 0, int? sourceEnd, int targetStart = 0, int? targetEnd}) → Match - Finds the longest matching block in the provided ranges.
-
groupedOperations(
{int context = 3}) → Iterable< List< Operation> > -
Returns a sequence of operations describing how to turn source into
target keeping a
context
of lines before and after each change. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited