Quantity class

Expresses how often something is repeated

Constructors

Quantity.atLeast(int min)
Example: var regex = FluentRegex().literal('a', Quantity.atLeast(2)); expect(regex.hasMatch(''), false); expect(regex.hasMatch('a'), false); expect(regex.hasMatch('aa'), true); expect(regex.findFirst('aaa'), 'aaa');
const
Quantity.atMost(int max)
Example: var regex = FluentRegex().literal('a', Quantity.atMost(2)); expect(regex.hasMatch(''), true); expect(regex.hasMatch('a'), true); expect(regex.hasMatch('aa'), true); expect(regex.findFirst('aaa'), 'aa');
const
Quantity.between(int min, int max)
Example: var regex = FluentRegex().literal('a', Quantity.between(1,2)); expect(regex.hasMatch(''), false); expect(regex.hasMatch('a'), true); expect(regex.hasMatch('aa'), true); expect(regex.findFirst('aaa'), 'aa');
const
Quantity.exactly(int times)
Example: var regex = FluentRegex().literal('a', Quantity.exactly(2)); expect(regex.hasMatch(''), false); expect(regex.hasMatch('a'), false); expect(regex.hasMatch('aa'), true); expect(regex.findFirst('aaa'), 'aa');
const
Quantity.oneOrMoreTimes()
Example: var regex = FluentRegex().literal('a', Quantity.oneOrMoreTimes()); expect(regex.hasMatch(''), false); expect(regex.hasMatch('a'), true); expect(regex.hasMatch('aa'), true);
const
Quantity.oneTime()
Example: var regex = FluentRegex().literal('a', Quantity.oneTime()); expect(regex.hasMatch(''), false); expect(regex.hasMatch('a'), true);
const
Quantity.zeroOrMoreTimes()
Example: var regex = FluentRegex().literal('a', Quantity.zeroOrMoreTimes()); expect(regex.hasMatch(''), true); expect(regex.hasMatch('a'), true); expect(regex.hasMatch('aa'), true);
const
Quantity.zeroOrOneTime()
Example: var regex = FluentRegex().literal('a', Quantity.zeroOrOneTime()); expect(regex.hasMatch(''), true); expect(regex.hasMatch('a'), true);
const

Properties

greedy Quantity
A greedy quantifier indicates the engine to start with the whole string. If no match is found it will if will reduce a character to check until it matches (or not)
no setter
hashCode int
The hash code for this object.
no setteroverride
possessive Quantity
A possessive quantifier is similar to a greedy quantifier. It indicates the engine to start by checking the entire string. It is different in the sense if it doesn't work: if there is no initial match, there is no looking back. E.g. this can be used to increase performance.
no setter
reluctant Quantity
A reluctant quantifier indicates the engine to start with the shortest possible piece of string. If no match is found it will if will add a character to check until it matches (or not)
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override