SetBaseToCollectionGenericConverter class
A converter that transforms a col.SetBase to a specific collection subtype.
Supported conversions:
col.SetBase→col.SetBasecol.SetBase→Setcol.SetBase→Listcol.SetBase→Queuecol.SetBase→Iterablecol.SetBase→HashSetcol.SetBase→LinkedQueuecol.SetBase→LinkedListcol.SetBase→LinkedStackcol.SetBase→Stackcol.SetBase→col.LinkedHashSetcol.SetBase→col.ListBasecol.SetBase→col.SetBasecol.SetBase→col.Queue
Example:
final converter = SetBaseToCollectionConverter();
print(converter.convert(SetBase.from([1, 2, 3]), Class.forType(SetBase), Class<List>(null, PackageNames.DART))); // prints: [1, 2, 3]
- Inheritance
-
- Object
- PairedConverter
- PairedConditionalConverter
- CollectionToCollectionConverter
- SetBaseToCollectionGenericConverter
Constructors
- SetBaseToCollectionGenericConverter(ConversionService cs)
- A converter that transforms a col.SetBase to a specific collection subtype.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
convert<
T> (Object? source, Class sourceType, Class targetType) → Object? -
A general-purpose converter that can convert between multiple source–target type pairs.
inherited
-
getConvertibleTypes(
) → Set< ConvertiblePair> ? -
A general-purpose converter that can convert between multiple source–target type pairs.
inherited
-
getPackageName(
) → String -
Represents an abstraction for identifying the package that an object,
resource, or service belongs to.
inherited
-
matches(
Class sourceType, Class targetType) → bool -
A contract for a converter that only matches under certain conditions.
inherited
-
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