co.streamx.fluent.JPA.util.ScopedArrayList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-jpa Show documentation
Show all versions of fluent-jpa Show documentation
Fluent query implementation for JPA repositories
The newest version!
package co.streamx.fluent.JPA.util;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import lombok.RequiredArgsConstructor;
@SuppressWarnings("serial")
@RequiredArgsConstructor
public class ScopedArrayList extends ArrayList {
private final List upper;
protected List getUpper() {
return this.upper;
}
@Override
public int size() {
return super.size() + upper.size();
}
@Override
public boolean isEmpty() {
return super.isEmpty() && upper.isEmpty();
}
@Override
public boolean contains(Object o) {
return super.contains(o) || upper.contains(o);
}
@Override
public boolean remove(Object o) {
throw new UnsupportedOperationException();
}
@Override
public boolean containsAll(Collection> c) {
throw new UnsupportedOperationException();
}
@Override
public boolean addAll(Collection extends E> c) {
throw new UnsupportedOperationException();
}
@Override
public boolean addAll(int index,
Collection extends E> c) {
throw new UnsupportedOperationException();
}
@Override
public boolean removeAll(Collection> c) {
throw new UnsupportedOperationException();
}
@Override
public boolean retainAll(Collection> c) {
throw new UnsupportedOperationException();
}
@Override
public void clear() {
throw new UnsupportedOperationException();
}
@Override
public E get(int index) {
throw new UnsupportedOperationException();
}
@Override
public E set(int index,
E element) {
throw new UnsupportedOperationException();
}
@Override
public void add(int index,
E element) {
throw new UnsupportedOperationException();
}
@Override
public E remove(int index) {
throw new UnsupportedOperationException();
}
@Override
public int indexOf(Object o) {
throw new UnsupportedOperationException();
}
@Override
public int lastIndexOf(Object o) {
throw new UnsupportedOperationException();
}
}