Get object from array or list at index.
@param array to retrieve from
@param index of the element to retrieve
@return Array.get for array or List.get for list
@throws UtilTargetError wrapped Index out of bounds
168784
public static Object getIndex(Object array, int index)
            throws UtilTargetError {
        Interpreter.debug("getIndex: ", array, ", index=", index);
        try {
            if ( array instanceof List )
                return ((List<?>) array).get(index);
            Object val = Array.get(array, index);
            return Primitive.wrap( val, Types.arrayElementType(array.getClass()) );
        } catch( IndexOutOfBoundsException e1 ) {
            int len = array instanceof List
                    ? ((List<?>) array).size()
                    : Array.getLength(array);
            throw new UtilTargetError("Index " + index
                    + " out-of-bounds for length " + len, e1);
        }
    }
658271
private JSONObject getKeyword(final JSONArray keywords, final int index) {
    JSONObject object = new JSONObject();
    try {
      object = (JSONObject) keywords.get(index);
    }
    catch(JSONException e) {
      e.printStackTrace();
    }
    return object;
  }
463149
@Override
	public <T> T get(int index, Class<T> type) {
		if (FETCHERS.containsKey(type))
			return getByType(index, type);
		else
			throw new IllegalArgumentException("has no value with " + type + " at index " + index);
	}
414006
public E get(int index) {
        if (index >= mSize)
            throw new IndexOutOfBoundsException("Index: " + index + ", Size: "
                    + mSize);

        return index < 0 ? mElements.get(index + mSize) : mElements.get(index);
    }
451792
@SuppressWarnings("unchecked")
    public static List<Float> getAt(float[] array, Collection indices) {
        return primitiveArrayGet(array, indices);
    }
5627
protected final Object arrayLookup(Object array, int index) {
        LOGGER.trace("get value from array index " + index);
        return Array.get(array, index);
    }
115625
Serializer getSerializer(int index) {
    if (index >= serializersArray.length) {
      throw new IllegalArgumentException(String.format("The serializer can't be found at index %d", index));
    }
    return serializersArray[index];
  }
255744
@Override
    public INDArray get(INDArrayIndex... indexes) {

        sort();

        if (indexes.length == 1 && indexes[0] instanceof NDArrayIndexAll || (indexes.length == 2 && (isRowVector()
                        && indexes[0] instanceof PointIndex && indexes[0].offset() == 0
                        && indexes[1] instanceof NDArrayIndexAll
                        || isColumnVector() && indexes[1] instanceof PointIndex && indexes[0].offset() == 0
                                        && indexes[0] instanceof NDArrayIndexAll)))
            return this;

        throw new UnsupportedOperationException("Not implemented");
    }
683090
public JsonArray optJsonArray(int index) {
        JsonElement el;
        try {
            el = get(index);
        } catch (JsonException e) {
            return null;
        }
        if (!el.isJsonArray()) {
            return null;
        }
        return el.asJsonArray();
    }
1096880
@GuardedBy("lock")
    protected T[] getRow(int index) {
        T[] row=matrix[index];
        if(row == null) {
            row=(T[])new Object[elements_per_row];
            matrix[index]=row;
        }
        return row;
    }
467903
private static <T> T get(ListIterator<? extends T> i, int index) {
        T obj = null;
        int pos = i.nextIndex();
        if (pos <= index) {
            do {
                obj = i.next();
            } while (pos++ < index);
        } else {
            do {
                obj = i.previous();
            } while (--pos > index);
        }
        return obj;
    }
170672
@SuppressWarnings("unchecked")
    public static List<Long> getAt(long[] array, Collection indices) {
        return primitiveArrayGet(array, indices);
    }
959542
public Object get(int index) {

        if (index >= elementCount) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " >= "
                                                + elementCount);
        }

        if (index < 0) {
            throw new IndexOutOfBoundsException("Index out of bounds: "
                                                + index + " < 0");
        }

        return elementData[index];
    }
722398
public JSONObject getObject(int index) {
        Object tmp = mArray.get(index);
        return tmp == null ? null
                : tmp instanceof JSONObject ? (JSONObject) tmp : null;
    }
244197
public LazyArray getJSONArray(int index) throws LazyException{
		LazyNode token=getValueToken(index);
		if(token.type!=LazyNode.ARRAY)throw new LazyException("Requested value is not an array",token);
		LazyArray arr= new LazyArray(token);
		arr.parent=this;
		return arr;
	}
1232871
public T get(int index) {
        if (index < 0 || index >= size) {
            return null;
        }
        if (!wasFullAtleastOnce && index >= emptyItemIndex) {
            return null;
        }
        return (T)(items[index]);
    }
1211714
@Override
  @SuppressWarnings("unchecked")
  public E get(int index) {
    Preconditions.checkElementIndex(index, size);
    return (E) array[index + offset];
  }