
com.artclod.common.collect.builder.GuavaImFListBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functional-collections Show documentation
Show all versions of functional-collections Show documentation
FCollections is a series of function style Java Collections
package com.artclod.common.collect.builder;
import java.util.Collection;
import java.util.Iterator;
import com.artclod.common.collect.GuavaImFList;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;
public class GuavaImFListBuilder implements CollectionBuilder> {
private Builder inner;
public GuavaImFListBuilder(ImmutableList.Builder inner) {
this.inner = inner;
}
@Override
public GuavaImFList build() {
return new GuavaImFList(inner.build());
}
@Override
public int size() {
throw new UnsupportedOperationException();
}
@Override
public boolean isEmpty() {
throw new UnsupportedOperationException();
}
@Override
public boolean contains(Object o) {
throw new UnsupportedOperationException();
}
@Override
public Iterator iterator() {
throw new UnsupportedOperationException();
}
@Override
public Object[] toArray() {
throw new UnsupportedOperationException();
}
@Override
public T[] toArray(T[] a) {
throw new UnsupportedOperationException();
}
@Override
public boolean add(E e) {
inner.add(e);
return true;
}
@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) {
inner.addAll(c);
return false;
}
@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();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy