Example usage for org.apache.commons.collections15 CollectionUtils get

List of usage examples for org.apache.commons.collections15 CollectionUtils get

Introduction

In this page you can find the example usage for org.apache.commons.collections15 CollectionUtils get.

Prototype

public static Object get(Object object, int index) 

Source Link

Document

Returns the index-th value in object, throwing IndexOutOfBoundsException if there is no such element or IllegalArgumentException if object is not an instance of one of the supported types.

Usage

From source file:org.drugis.mtc.gui.AnalysesModel.java

@Override
public Object getChild(Object parent, int index) {
    if (parent == d_root) {
        return CollectionUtils.get(d_nodes.keySet(), index);
    } else if (parent instanceof ModelType && d_nodes.containsKey(parent)) {
        return CollectionUtils.get(d_nodes.get(parent), index);
    }/*w  w w  .  ja v a  2  s  .c  o m*/
    return null;
}