get<E> method
Get the index
th element.
If index
is out of range, or is itself Null, or the value is not E
, defaultValue
is returned.
index
番目の要素を取得します。
index
が範囲外、もしくは自身がNull、値がE
でない場合、defaultValue
が返されます。
Implementation
E get<E>(int index, E defaultValue) {
if (this == null || !containsIndex(index) || this![index] is! E) {
return defaultValue;
}
return this![index] as E;
}