A collection of OSString with every elements comply matching staregy when the first OSString inserted.
This set not only comply single object occurence of Set, but also mandated to unify String matching method except the first added OSString element.
final strs = OSStringsSet.of(<OSString>[
OSString.allCapital("foo"), // Retained
OSString.caseSensitive("FOO"), // Ignored
OSString.allCapital("bar"), // Retained
OSString.caseSensitive("baz") // Ignored
]);
Constructors
- OSStringsSet()
-
Create empty set of OSString.
factory
-
OSStringsSet.fromStrings(Iterable<
String> strs, [int flag = OSString.DEFAULT_MATCH]) -
Instantly create a OSStringsSet with String and preferred
flagapplied fromOSString.matchingFlag.factory -
OSStringsSet.of(Iterable<
OSString> elements) -
Create a Set and then immediate addAll provided
elements.factory -
OSStringsSet.unmodifiable(Iterable<
OSString> elements) -
Create an unmodifiable OSStringsSet.
factory
Properties
- first → OSString
-
The first element.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
Whether this collection has no elements.
no setterinherited
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<
OSString> -
An iterator that iterates over the elements of this set.
no setterinherited
- last → OSString
-
The last element.
no setterinherited
- length → int
-
The number of elements in this Iterable.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → OSString
-
Checks that this iterable has only one element, and returns that element.
no setterinherited
Methods
-
add(
OSString value) → bool -
Adds
valueto the set.override -
addAll(
Iterable< OSString> elements) → void -
Add multiple
elementswith identical matching method defined from the first element into OSStringsSet at once.override -
any(
bool test(OSString element)) → bool -
Checks whether any element of this iterable satisfies
test.inherited -
cast<
R> () → Set< R> -
Provides a view of this set as a set of
Rinstances.inherited -
clear(
) → void -
Removes all elements from the set.
inherited
-
contains(
Object? element) → bool -
Whether
valueis in the set.override -
containsAll(
Iterable< Object?> other) → bool -
Whether this set contains all the elements of
other.inherited -
containsByString(
String str) → bool -
Check does it contains preferred OSString
in literial.
inherited
-
difference(
Set< Object?> other) → Set<OSString> -
Creates a new set with the elements of this that are not in
other.inherited -
elementAt(
int index) → OSString -
Returns the
indexth element.inherited -
every(
bool f(OSString element)) → bool -
Checks whether every element of this iterable satisfies
test.inherited -
expand<
T> (Iterable< T> f(OSString element)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
inherited
-
firstWhere(
bool test(OSString value), {OSString orElse()?}) → OSString -
The first element that satisfies the given predicate
test.inherited -
fold<
T> (T initialValue, T combine(T previousValue, OSString element)) → T -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
followedBy(
Iterable< OSString> other) → Iterable<OSString> -
Creates the lazy concatenation of this iterable and
other.inherited -
forEach(
void f(OSString element)) → void -
Invokes
actionon each element of this iterable in iteration order.inherited -
intersection(
Set< Object?> other) → Set<OSString> -
Creates a new set which is the intersection between this set and
other.inherited -
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings.
inherited
-
lastWhere(
bool test(OSString value), {OSString orElse()?}) → OSString -
The last element that satisfies the given predicate
test.inherited -
lookup(
Object? element) → OSString? -
If an object equal to
objectis in the set, return it.override -
lookupByString(
String str) → OSString? -
lookup an OSString that the given
stris satsified the matching condition.inherited -
map<
T> (T f(OSString element)) → Iterable< T> -
The current elements of this iterable modified by
toElement.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reduce(
OSString combine(OSString value, OSString element)) → OSString -
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
inherited
-
remove(
Object? value) → bool -
Removes
valuefrom the set.override -
removeAll(
Iterable< Object?> elements) → void -
Removes each element of
elementsfrom this set.inherited -
removeByString(
String str) → bool -
Attempt to remove element by finding matched
strin String.inherited -
removeWhere(
bool test(OSString element)) → void -
Removes all elements of this set that satisfy
test.inherited -
retainAll(
Iterable< Object?> elements) → void -
Removes all elements of this set that are not elements in
elements.inherited -
retainWhere(
bool test(OSString element)) → void -
Removes all elements of this set that fail to satisfy
test.inherited -
singleWhere(
bool test(OSString value), {OSString orElse()?}) → OSString -
The single element that satisfies
test.inherited -
skip(
int n) → Iterable< OSString> -
Creates an Iterable that provides all but the first
countelements.inherited -
skipWhile(
bool test(OSString value)) → Iterable< OSString> -
Creates an
Iterablethat skips leading elements whiletestis satisfied.inherited -
take(
int n) → Iterable< OSString> -
Creates a lazy iterable of the
countfirst elements of this iterable.inherited -
takeWhile(
bool test(OSString value)) → Iterable< OSString> -
Creates a lazy iterable of the leading elements satisfying
test.inherited -
toList(
{bool growable = true}) → List< OSString> -
Creates a List containing the elements of this Iterable.
inherited
-
toSet(
) → Set< OSString> -
Creates a Set with the same elements and behavior as this
Set.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
union(
Set< OSString> other) → Set<OSString> -
Creates a new set which contains all the elements of this set and
other.inherited -
where(
bool f(OSString element)) → Iterable< OSString> -
Creates a new lazy Iterable with all elements that satisfy the
predicate
test.inherited -
whereType<
T> () → Iterable< T> -
Creates a new lazy Iterable with all elements that have type
T.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited