~ indentation or something

Signed-off-by: Johannes Theiner <j.theiner@live.de>
This commit is contained in:
Johannes Theiner 2019-10-10 10:03:00 +02:00
parent 2fb72180f9
commit 442ffc16bb
1 changed files with 93 additions and 93 deletions

View File

@ -36,7 +36,7 @@ public class RingList<E> implements List<E> {
} }
private Wrapper getWrapper(int index) { private Wrapper getWrapper(int index) {
if(index == -1) return first; if (index == -1) return first;
Wrapper wRun; Wrapper wRun;
if (index < 0 || index >= size) { if (index < 0 || index >= size) {
throw new IndexOutOfBoundsException(); throw new IndexOutOfBoundsException();
@ -70,7 +70,7 @@ public class RingList<E> implements List<E> {
public boolean remove(Object o) { public boolean remove(Object o) {
try { try {
int index = indexOf((E) o); int index = indexOf((E) o);
if(index == -1) return false; if (index == -1) return false;
remove(index); remove(index);
return true; return true;
@ -85,9 +85,9 @@ public class RingList<E> implements List<E> {
public int indexOf(E e) { public int indexOf(E e) {
Wrapper wrapper = this.first.succ; Wrapper wrapper = this.first.succ;
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
if(wrapper.e.equals(e)) { if (wrapper.e.equals(e)) {
return i; return i;
}else wrapper = wrapper.succ; } else wrapper = wrapper.succ;
} }
return -1; return -1;
} }