keepIndices method

Queue<E> keepIndices(
  1. Iterable<int> indices
)

Returns elements at the given indices.

10, 11, 12.keepIndices(0, 2) returns 10, 12.

Invalid and repeat indices are ignored.

Implementation

Queue<E> keepIndices(Iterable<int> indices) {
  return h.keepIndicesIterable(original: this, indices: indices).toQueue();
}