EveryOverrideAdapter<T extends Every, V extends DateValidator> class
Class that wraps an Every generator and adds a DateValidator that will be used to invalidate the generated dates and an overrider that will be used instead.
When the validator invalidates the generated dates, the overrider will be used instead.
- Inheritance
-
- Object
- Every
- EveryDateValidator
- EveryAdapter<
T, V> - EveryAdapterInvalidator<
T, V> - LimitedEveryAdapterInvalidator<
T, V> - EveryOverrideAdapter
- Mixed-in types
- Implementers
Constructors
- EveryOverrideAdapter({required T every, required V validator, required T overrider})
-
Class that wraps an Every generator and adds a DateValidator that will
be used to invalidate the generated dates and an overrider that will be
used instead.
const
Properties
- every → T
-
The base generator for this EveryAdapter.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- overrider → T
-
The every used instead of the original when the generated date is valid
for the validator.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, the toString method will be overridden to output this instance's props.no setterinherited - validator → V
-
The validator used by this EveryAdapter.
finalinherited
Methods
-
endDate(
DateTime date, {DateTime? limit}) → DateTime -
Returns the previous DateTime that matches the Every pattern.
inherited
-
filterValidDates(
Iterable< DateTime> dates) → Iterable<DateTime> -
Returns the valid dates for this DateValidator in
dates.inherited -
invalid(
DateTime date) → bool -
Returns true if the
dateis invalid for this DateValidator.inherited -
next(
DateTime date, {DateTime? limit}) → DateTime -
Returns the next instance of the given
dateconsidering this Every base process.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
previous(
DateTime date, {DateTime? limit}) → DateTime -
Returns the previous instance of the given
dateconsidering this Every base process.inherited -
processDate(
DateTime date, DateDirection direction, {DateTime? limit}) → DateTime -
When the
dateis valid for the validator, the overrider will be used instead of every.override -
startDate(
DateTime date, {DateTime? limit}) → DateTime -
Returns the start date considering the given every base process.
If every is a LimitedEveryDateValidator, the
limitwill be passed on.inherited -
throwIfLimitReached(
DateTime date, DateDirection direction, {required DateTime? limit}) → void -
Throws a DateTimeLimitReachedException if the
datehas reached thelimitin the givendirection.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
valid(
DateTime date) → bool -
Returns
trueif thedateis valid for the every (if it is a DateValidator, like an EveryDateValidator, for example) and not valid for the validator.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator unary-(
) → DateValidator -
inherited