Applied-Energistics-2-tiler.../src/main/java/appeng/util/ReadOnlyCollection.java

42 lines
571 B
Java
Raw Normal View History

2014-09-24 02:26:27 +02:00
package appeng.util;
import java.util.Collection;
import java.util.Iterator;
import appeng.api.util.IReadOnlyCollection;
public class ReadOnlyCollection<T> implements IReadOnlyCollection<T>
{
private final Collection<T> c;
public ReadOnlyCollection(Collection<T> in) {
c = in;
}
@Override
2014-09-28 22:20:14 +02:00
public Iterator<T> iterator()
2014-09-24 02:26:27 +02:00
{
return c.iterator();
}
@Override
public int size()
{
return c.size();
}
@Override
public boolean isEmpty()
{
return c.isEmpty();
}
@Override
public boolean contains(Object node)
{
return c.contains( node );
}
}