List of utility methods to do List Starts with
boolean | startsWith(List left, List right, boolean equals) starts With if (left == null || right == null) return false; int l = left.size(); int r = right.size(); if (r > l || !equals && r == l) return false; for (int i = 0; i < r; i++) if (!equals(left.get(i), right.get(i))) ... |
boolean | startsWith(List left, List right, boolean equals) starts With if (left == null || right == null) { return false; } else { int l = left.size(); int r = right.size(); if (r > l || !equals && r == l) { return false; for (int i = 0; i < r; i++) { if (!equals(left.get(i), right.get(i))) { return false; return true; |
boolean | startsWith(List Returns whether one list is a prefix of another. return list0.equals(list1) || list0.size() > list1.size() && list0.subList(0, list1.size()).equals(list1);
|
boolean | startsWith(List Checks if the list starts with specific elements. final int stringSize = string.size(); final int prefixSize = prefix.size(); if (prefixSize > stringSize) { return false; return prefix.equals(string.subList(0, prefixSize)); |
boolean | startsWithAny(String s, List Tests whether a string starts with any of a list of strings. int count = prefixes.size(); for (int i = 0; i < count; ++i) { if (s.startsWith((String) prefixes.get(i))) { return true; return false; |
boolean | startsWithWord(String aTarget, List starts With Word for (String tCurrentExpectWord : aExpectWordList) { if (aTarget.startsWith(tCurrentExpectWord)) return true; return false; |