Java Collection Element Get get(Collection collection, int index)

Here you can find the source of get(Collection collection, int index)

Description

get

License

Open Source License

Declaration

@SuppressWarnings("unchecked")
    public static <E> E get(Collection<E> collection, int index) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

public class Main {
    @SuppressWarnings("unchecked")
    public static <E> E get(Collection<E> collection, int index) {
        return (E) collection.toArray()[index];
    }//  w  ww.  j a v a2 s .c  o  m
}

Related

  1. get(Collection coll, int index)
  2. get(Collection p_collection, int p_index)
  3. get(Collection arr, int idx)
  4. get(Collection p_oCol, T p_oObj)
  5. get(Collection v, int i)
  6. get(final Collection list, final int pos)
  7. get(final Collection collection, final int index)