Java Utililty Methods List Shift

List of utility methods to do List Shift

Description

The list of methods to do List Shift are organized into topic(s).

Method

Tshift(List list)
shift
return remove(list, 0);
voidshift(String s, int length, List list, StringBuffer res)
shift
if (length == 0) {
    if (!list.contains(res.toString())) {
        list.add(res.toString());
} else {
    for (int i = 0; i < s.length(); i++) {
        String news = s.substring(0, i) + s.substring(i + 1, s.length());
        String simb = s.substring(i, i + 1);
...
ListshiftElementsToEnd(final List source, final int count)
returns a list of everything in source, with the first count units moved to the end
final ArrayList<T> rVal = new ArrayList<>(source.size());
for (int i = count; i < source.size(); i++) {
    rVal.add(source.get(i));
for (int i = 0; i < count; i++) {
    rVal.add(source.get(i));
if (source.size() != rVal.size()) {
...