/** As {@link #arrayItem} method, but allows array to be nullable. */ public static Object arrayItemOptional(List list, int item) { if (list == null) { return null; } return arrayItem(list, item); }
/** As {@link #arrayItem} method, but allows array to be nullable. */ public static Object arrayItemOptional(List list, int item) { if (list == null) { return null; } return arrayItem(list, item); }
/** As {@link #arrayItem} method, but allows array to be nullable. */ public static Object arrayItemOptional(List list, int item) { if (list == null) { return null; } return arrayItem(list, item); }
/** Implements the {@code [ ... ]} operator on an object whose type is not * known until runtime. */ public static Object item(Object object, Object index) { if (object instanceof Map) { return mapItem((Map) object, index); } if (object instanceof List && index instanceof Number) { return arrayItem((List) object, ((Number) index).intValue()); } return null; }
/** Implements the {@code [ ... ]} operator on an object whose type is not * known until runtime. */ public static Object item(Object object, Object index) { if (object instanceof Map) { return mapItem((Map) object, index); } if (object instanceof List && index instanceof Number) { return arrayItem((List) object, ((Number) index).intValue()); } return null; }
/** Implements the {@code [ ... ]} operator on an object whose type is not * known until runtime. */ public static Object item(Object object, Object index) { if (object instanceof Map) { return mapItem((Map) object, index); } if (object instanceof List && index instanceof Number) { return arrayItem((List) object, ((Number) index).intValue()); } return null; }