HostMatcherPatterns extension
Adds pattern-matching-related methods to HostMatcher.
- on
Methods
-
map<
TResult extends Object?> ({required TResult exact(HostMatcher_Exact value), required TResult suffix(HostMatcher_Suffix value), required TResult cidr(HostMatcher_Cidr value)}) → TResult -
Available on HostMatcher, provided by the HostMatcherPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? exact(HostMatcher_Exact value)?, TResult? suffix(HostMatcher_Suffix value)?, TResult? cidr(HostMatcher_Cidr value)?}) → TResult? -
Available on HostMatcher, provided by the HostMatcherPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult exact(HostMatcher_Exact value)?, TResult suffix(HostMatcher_Suffix value)?, TResult cidr(HostMatcher_Cidr value)?, required TResult orElse()}) → TResult -
Available on HostMatcher, provided by the HostMatcherPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult exact(String value)?, TResult suffix(String value)?, TResult cidr(String value)?, required TResult orElse()}) → TResult -
Available on HostMatcher, provided by the HostMatcherPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> ({required TResult exact(String value), required TResult suffix(String value), required TResult cidr(String value)}) → TResult -
Available on HostMatcher, provided by the HostMatcherPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? exact(String value)?, TResult? suffix(String value)?, TResult? cidr(String value)?}) → TResult? -
Available on HostMatcher, provided by the HostMatcherPatterns extension
A variant ofwhenthat fallback to returningnull