StackToCollectionGenericConverter constructor
StackToCollectionGenericConverter()
A converter that transforms a Stack to a specific collection subtype.
Supported conversions:
Stack→StackStack→QueueStack→ListStack→SetStack→IterableStack→LinkedQueueStack→LinkedStackStack→col.LinkedHashSetStack→col.ListBaseStack→col.SetBaseStack→col.Queue
Example:
final converter = StackToCollectionConverter();
print(converter.convert(Stack.from([1, 2, 3]), Class.forType(Stack), Class<List>(null, PackageNames.DART))); // prints: [1, 2, 3]
Implementation
StackToCollectionGenericConverter(ConversionService cs) : super(cs, Class<Stack>(null, PackageNames.LANG));