All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codefilarete.tool.collection.ReadOnlyCollection Maven / Gradle / Ivy

package org.codefilarete.tool.collection;

import java.util.Collection;
import java.util.Iterator;
import java.util.function.Predicate;

/**
 * 
 * @param 
 * @param 
 */
public class ReadOnlyCollection> extends CollectionWrapper {
	
	protected ReadOnlyCollection(C delegate) {
		super(delegate);
	}
	
	@Override
	public final boolean add(E e) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public final boolean remove(Object o) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public final boolean removeIf(Predicate filter) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public final boolean addAll(Collection c) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public final boolean removeAll(Collection c) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public final boolean retainAll(Collection c) {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public final void clear() {
		throw new UnsupportedOperationException();
	}
	
	@Override
	public Iterator iterator() {
		return ReadOnlyIterator.wrap(delegate.iterator());
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy