Checkstyle fixes.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1369937 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-08-06 19:29:00 +00:00
parent 614013ae31
commit c8b641ee6e
4 changed files with 43 additions and 1 deletions

View File

@ -128,6 +128,11 @@ public final class UnmodifiableOrderedBidiMap<K, V>
return UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(it);
}
/**
* Gets an unmodifiable view of this map where the keys and values are reversed.
*
* @return an inverted unmodifiable bidirectional map
*/
public OrderedBidiMap<V, K> inverseOrderedBidiMap() {
if (inverse == null) {
inverse = new UnmodifiableOrderedBidiMap<V, K>(decorated().inverseBidiMap());

View File

@ -80,54 +80,68 @@ public abstract class AbstractCollectionDecorator<E>
}
//-----------------------------------------------------------------------
/** {@inheritDoc} */
public boolean add(E object) {
return decorated().add(object);
}
/** {@inheritDoc} */
public boolean addAll(Collection<? extends E> coll) {
return decorated().addAll(coll);
}
/** {@inheritDoc} */
public void clear() {
decorated().clear();
}
/** {@inheritDoc} */
public boolean contains(Object object) {
return decorated().contains(object);
}
/** {@inheritDoc} */
public boolean isEmpty() {
return decorated().isEmpty();
}
/** {@inheritDoc} */
public Iterator<E> iterator() {
return decorated().iterator();
}
/** {@inheritDoc} */
public boolean remove(Object object) {
return decorated().remove(object);
}
/** {@inheritDoc} */
public int size() {
return decorated().size();
}
/** {@inheritDoc} */
public Object[] toArray() {
return decorated().toArray();
}
/** {@inheritDoc} */
public <T> T[] toArray(T[] object) {
return decorated().toArray(object);
}
/** {@inheritDoc} */
public boolean containsAll(Collection<?> coll) {
return decorated().containsAll(coll);
}
/** {@inheritDoc} */
public boolean removeAll(Collection<?> coll) {
return decorated().removeAll(coll);
}
/** {@inheritDoc} */
public boolean retainAll(Collection<?> coll) {
return decorated().retainAll(coll);
}

View File

@ -66,42 +66,52 @@ public abstract class AbstractUntypedCollectionDecorator<E, D> implements Collec
return collection;
}
/** {@inheritDoc} */
public void clear() {
decorated().clear();
}
/** {@inheritDoc} */
public boolean contains(Object object) {
return decorated().contains(object);
}
/** {@inheritDoc} */
public boolean isEmpty() {
return decorated().isEmpty();
}
/** {@inheritDoc} */
public boolean remove(Object object) {
return decorated().remove(object);
}
/** {@inheritDoc} */
public int size() {
return decorated().size();
}
/** {@inheritDoc} */
public Object[] toArray() {
return decorated().toArray();
}
/** {@inheritDoc} */
public <T> T[] toArray(T[] object) {
return decorated().toArray(object);
}
/** {@inheritDoc} */
public boolean containsAll(Collection<?> coll) {
return decorated().containsAll(coll);
}
/** {@inheritDoc} */
public boolean removeAll(Collection<?> coll) {
return decorated().removeAll(coll);
}
/** {@inheritDoc} */
public boolean retainAll(Collection<?> coll) {
return decorated().retainAll(coll);
}
@ -121,4 +131,4 @@ public abstract class AbstractUntypedCollectionDecorator<E, D> implements Collec
return decorated().toString();
}
}
}

View File

@ -100,36 +100,43 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
}
//-----------------------------------------------------------------------
/** {@inheritDoc} */
public boolean add(E object) {
synchronized (lock) {
return decorated().add(object);
}
}
/** {@inheritDoc} */
public boolean addAll(Collection<? extends E> coll) {
synchronized (lock) {
return decorated().addAll(coll);
}
}
/** {@inheritDoc} */
public void clear() {
synchronized (lock) {
decorated().clear();
}
}
/** {@inheritDoc} */
public boolean contains(Object object) {
synchronized (lock) {
return decorated().contains(object);
}
}
/** {@inheritDoc} */
public boolean containsAll(Collection<?> coll) {
synchronized (lock) {
return decorated().containsAll(coll);
}
}
/** {@inheritDoc} */
public boolean isEmpty() {
synchronized (lock) {
return decorated().isEmpty();
@ -150,36 +157,42 @@ public class SynchronizedCollection<E> implements Collection<E>, Serializable {
return decorated().iterator();
}
/** {@inheritDoc} */
public Object[] toArray() {
synchronized (lock) {
return decorated().toArray();
}
}
/** {@inheritDoc} */
public <T> T[] toArray(T[] object) {
synchronized (lock) {
return decorated().toArray(object);
}
}
/** {@inheritDoc} */
public boolean remove(Object object) {
synchronized (lock) {
return decorated().remove(object);
}
}
/** {@inheritDoc} */
public boolean removeAll(Collection<?> coll) {
synchronized (lock) {
return decorated().removeAll(coll);
}
}
/** {@inheritDoc} */
public boolean retainAll(Collection<?> coll) {
synchronized (lock) {
return decorated().retainAll(coll);
}
}
/** {@inheritDoc} */
public int size() {
synchronized (lock) {
return decorated().size();