cast<T> method
Returns a view of this list as a list of T
instances.
If this list contains only instances of T
, all read operations
will work correctly. If any operation tries to access an element
that is not an instance of T
, the access will throw instead.
Elements added to the list (e.g., by using add or addAll)
must be instance of T
to be valid arguments to the adding function,
and they must be instances of E
as well to be accepted by
this list as well.
Implementation
@override
ObservableList<T> cast<T>() => ObservableList.castFrom<E, T>(this);