diff --git a/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyCollection.java b/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyCollection.java index d566d75..c526965 100644 --- a/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyCollection.java +++ b/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyCollection.java @@ -33,7 +33,7 @@ * @author Georgy Vlasov (suseika@tendiwa.org) * @version $Id$ */ -final class WrappingReadOnlyCollection implements ReadOnlyCollection { +class WrappingReadOnlyCollection implements ReadOnlyCollection { /** * Wrapped collection. */ @@ -49,22 +49,22 @@ public WrappingReadOnlyCollection(final Collection wrp) { } @Override - public boolean contains(final T element) { + public final boolean contains(final T element) { return this.wrapped.contains(element); } @Override - public int size() { + public final int size() { return this.wrapped.size(); } @Override - public Iterator iterator() { + public final Iterator iterator() { return this.wrapped.iterator(); } @Override - public Stream stream() { + public final Stream stream() { return this.wrapped.stream(); } } diff --git a/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyList.java b/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyList.java index 4b6f8a4..0db7c40 100644 --- a/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyList.java +++ b/src/main/java/org/tendiwa/rocollections/WrappingReadOnlyList.java @@ -33,7 +33,7 @@ * @author Georgy Vlasov (suseika@tendiwa.org) * @version $Id$ */ -public final class WrappingReadOnlyList implements ReadOnlyList { +public class WrappingReadOnlyList implements ReadOnlyList { /** * Wrapped list. */ @@ -49,27 +49,27 @@ public WrappingReadOnlyList(final List wrp) { } @Override - public T get(final int index) { + public final T get(final int index) { return this.wrapped.get(index); } @Override - public boolean contains(final T element) { + public final boolean contains(final T element) { return this.wrapped.contains(element); } @Override - public int size() { + public final int size() { return this.wrapped.size(); } @Override - public Iterator iterator() { + public final Iterator iterator() { return this.wrapped.iterator(); } @Override - public Stream stream() { + public final Stream stream() { return this.wrapped.stream(); } } diff --git a/src/main/java/org/tendiwa/rocollections/WrappingReadOnlySet.java b/src/main/java/org/tendiwa/rocollections/WrappingReadOnlySet.java index a903b80..8e3bf1f 100644 --- a/src/main/java/org/tendiwa/rocollections/WrappingReadOnlySet.java +++ b/src/main/java/org/tendiwa/rocollections/WrappingReadOnlySet.java @@ -35,11 +35,11 @@ * @version $Id$ */ @SuppressWarnings("unused") -public final class WrappingReadOnlySet implements ReadOnlySet { +public class WrappingReadOnlySet implements ReadOnlySet { /** * The wrapped Set instance. */ - private final transient Set set; + private final Set set; /** * Wraps a {@link java.util.Set}. @@ -51,7 +51,7 @@ public final class WrappingReadOnlySet implements ReadOnlySet { } @Override - public boolean contains(final T element) { + public final boolean contains(final T element) { return this.set.contains(element); } @@ -61,7 +61,7 @@ public boolean contains(final T element) { * @return Size of this set. */ @Override - public int size() { + public final int size() { return this.set.size(); } @@ -71,7 +71,7 @@ public int size() { * @return Iterator over elements of this set. */ @Override - public Iterator iterator() { + public final Iterator iterator() { return this.set.iterator(); } @@ -81,7 +81,7 @@ public Iterator iterator() { * @return Stream over elements of this set. */ @Override - public Stream stream() { + public final Stream stream() { return this.set.stream(); } }