if (index < 0 || index >= array.length) return null; else return array[index];
int shift = index; for (T[] tab : arrays) { if (shift < tab.length) { return tab[shift]; } else { shift -= tab.length; return null;
return getArrayLength(array) > index ? array[index] : null;
Returns the value at the given index in the arrayor null if the index is out of bounds.
return index >= 0 && index < array.length ? array[index] : null;
ArrayList<Integer> result = new ArrayList<Integer>(); int start = 0; while (start < target.length) { String[] subArray = new String[target.length - start]; for (int iter = 0; iter < subArray.length; iter++) { subArray[iter] = target[iter + start]; int index = getFirst(subArray, pattern); ...
Map<String, String> argPairs = new HashMap<String, String>(); if (args != null) { for (String argPair : args) { String[] pair = argPair.split("="); if (pair.length > 1) { argPairs.put(pair[0], pair[1]); return argPairs;
if (flags == null || flags.length == 0) return null; if (args == null || args.length == 0) return defaultValue; final List<String> r = new ArrayList<String>(); int i = 0; outer: for (; i < args.length; i++) for (final String flag : flags) ...
Map<String, String[]> params = new HashMap<String, String[]>(); for (int i = 0; i < args.length; i++) { String inArg = args[i]; if (!inArg.startsWith("--")) { throw new Exception("Wrong argument syntax: " + inArg); } else { inArg = inArg.substring(2); for (int j = 0; j < singleArgs.length; j++) { if (singleArgs[j].equals(inArg)) { params.put(inArg, new String[] {}); if (inArg.contains("=")) { String[] keyset = inArg.split("=", 2); if (keyset[1].startsWith("{") && keyset[1].endsWith("}")) { params.put(keyset[0], new String[] { keyset[1].substring(1, keyset[1].length() - 1) }); } else { params.put(keyset[0], keyset[1].split(",")); return params;