private Collection<Boolean> shift(Collection<Boolean> data, int difference) {
        if (difference > 0 && difference < data.size()) {
            /* Ištrinama pradžia */
            int size = data.size() - difference;
            ArrayList<Boolean> result = new ArrayList<Boolean>(size);
            int i = 0;
            for (Boolean bit : data) {
                if (i >= difference) {
                    result.add(bit);
                } else {
                    i++;
                }
            }
            return result;
        } else if (difference < 0 && -difference < data.size()) {
            /* Ištrinamas galas */
            int size = data.size() + difference;
            ArrayList<Boolean> result = new ArrayList<Boolean>(size);
            int i = 0;
            for (Boolean bit : data) {
                if (i < size) {
                    result.add(bit);
                } else {
                    break;
                }
                i++;
            }
            return result;
        } else {
            /* Seka nekeičiama */
            return data;
        }
    }