mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-16 15:07:17 +00:00
Standardize on American English spelling of 'behavior'.
This commit is contained in:
parent
cd9789f779
commit
a6d53a7649
@ -34,7 +34,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Many Jakarta projects have needs or design criteria that extend
|
Many Jakarta projects have needs or design criteria that extend
|
||||||
beyond the core Collections API, such as introducing new abstract
|
beyond the core Collections API, such as introducing new abstract
|
||||||
data types (e.g., Avalon's BinaryHeap) or changing the behaviour of
|
data types (e.g., Avalon's BinaryHeap) or changing the behavior of
|
||||||
existing abstract data types (e.g., Struts' FastHashMap).
|
existing abstract data types (e.g., Struts' FastHashMap).
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@ -24,7 +24,7 @@ package org.apache.commons.collections4;
|
|||||||
* <p>
|
* <p>
|
||||||
* This class tries to handle {@code null} input gracefully. An exception will not be thrown for a {@code null} array
|
* This class tries to handle {@code null} input gracefully. An exception will not be thrown for a {@code null} array
|
||||||
* input. However, an Object array that contains a {@code null} element may throw an exception. Each method documents
|
* input. However, an Object array that contains a {@code null} element may throw an exception. Each method documents
|
||||||
* its behaviour.
|
* its behavior.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Package private, might move to an internal package if this needs to be public.
|
* Package private, might move to an internal package if this needs to be public.
|
||||||
|
@ -127,7 +127,7 @@ public class BagUtils {
|
|||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified bag will not be transformed.
|
* Existing entries in the specified bag will not be transformed.
|
||||||
* If you want that behaviour, see {@link TransformedBag#transformedBag(Bag, Transformer)}.
|
* If you want that behavior, see {@link TransformedBag#transformedBag(Bag, Transformer)}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param <E> the element type
|
* @param <E> the element type
|
||||||
@ -230,7 +230,7 @@ public class BagUtils {
|
|||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified bag will not be transformed.
|
* Existing entries in the specified bag will not be transformed.
|
||||||
* If you want that behaviour, see
|
* If you want that behavior, see
|
||||||
* {@link TransformedSortedBag#transformedSortedBag(SortedBag, Transformer)}.
|
* {@link TransformedSortedBag#transformedSortedBag(SortedBag, Transformer)}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
@ -1994,7 +1994,7 @@ public class CollectionUtils {
|
|||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified collection will not be transformed.
|
* Existing entries in the specified collection will not be transformed.
|
||||||
* If you want that behaviour, see {@link TransformedCollection#transformedCollection}.
|
* If you want that behavior, see {@link TransformedCollection#transformedCollection}.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param <E> the type of object the {@link Collection} contains
|
* @param <E> the type of object the {@link Collection} contains
|
||||||
|
@ -227,7 +227,7 @@ public class ListUtils {
|
|||||||
* different implementations of the {@code List} interface.
|
* different implementations of the {@code List} interface.
|
||||||
* </blockquote>
|
* </blockquote>
|
||||||
*
|
*
|
||||||
* <b>Note:</b> The behaviour of this method is undefined if the lists are
|
* <b>Note:</b> The behavior of this method is undefined if the lists are
|
||||||
* modified during the equals comparison.
|
* modified during the equals comparison.
|
||||||
*
|
*
|
||||||
* @see java.util.List
|
* @see java.util.List
|
||||||
@ -425,7 +425,7 @@ public class ListUtils {
|
|||||||
* method, as it is a backdoor for adding untransformed objects.
|
* method, as it is a backdoor for adding untransformed objects.
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified list will not be transformed.
|
* Existing entries in the specified list will not be transformed.
|
||||||
* If you want that behaviour, see {@link TransformedList#transformedList}.
|
* If you want that behavior, see {@link TransformedList#transformedList}.
|
||||||
*
|
*
|
||||||
* @param <E> the element type
|
* @param <E> the element type
|
||||||
* @param list the list to predicate, must not be null
|
* @param list the list to predicate, must not be null
|
||||||
|
@ -153,7 +153,7 @@ public class MapUtils {
|
|||||||
* Prints the given map with nice line breaks.
|
* Prints the given map with nice line breaks.
|
||||||
* <p>
|
* <p>
|
||||||
* This method prints a nicely formatted String describing the Map. Each map entry will be printed with key, value
|
* This method prints a nicely formatted String describing the Map. Each map entry will be printed with key, value
|
||||||
* and value classname. When the value is a Map, recursive behaviour occurs.
|
* and value classname. When the value is a Map, recursive behavior occurs.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* This method is NOT thread-safe in any special way. You must manually synchronize on either this class or the
|
* This method is NOT thread-safe in any special way. You must manually synchronize on either this class or the
|
||||||
@ -1857,7 +1857,7 @@ public class MapUtils {
|
|||||||
* Returns a transformed map backed by the given map.
|
* Returns a transformed map backed by the given map.
|
||||||
* <p>
|
* <p>
|
||||||
* This method returns a new map (decorating the specified map) that will transform any new entries added to it.
|
* This method returns a new map (decorating the specified map) that will transform any new entries added to it.
|
||||||
* Existing entries in the specified map will not be transformed. If you want that behaviour, see
|
* Existing entries in the specified map will not be transformed. If you want that behavior, see
|
||||||
* {@link TransformedMap#transformedMap}.
|
* {@link TransformedMap#transformedMap}.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
@ -1886,7 +1886,7 @@ public class MapUtils {
|
|||||||
* Returns a transformed sorted map backed by the given map.
|
* Returns a transformed sorted map backed by the given map.
|
||||||
* <p>
|
* <p>
|
||||||
* This method returns a new sorted map (decorating the specified map) that will transform any new entries added to
|
* This method returns a new sorted map (decorating the specified map) that will transform any new entries added to
|
||||||
* it. Existing entries in the specified map will not be transformed. If you want that behaviour, see
|
* it. Existing entries in the specified map will not be transformed. If you want that behavior, see
|
||||||
* {@link TransformedSortedMap#transformedSortedMap}.
|
* {@link TransformedSortedMap#transformedSortedMap}.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
@ -1949,7 +1949,7 @@ public class MapUtils {
|
|||||||
* Prints the given map with nice line breaks.
|
* Prints the given map with nice line breaks.
|
||||||
* <p>
|
* <p>
|
||||||
* This method prints a nicely formatted String describing the Map. Each map entry will be printed with key and
|
* This method prints a nicely formatted String describing the Map. Each map entry will be printed with key and
|
||||||
* value. When the value is a Map, recursive behaviour occurs.
|
* value. When the value is a Map, recursive behavior occurs.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* This method is NOT thread-safe in any special way. You must manually synchronize on either this class or the
|
* This method is NOT thread-safe in any special way. You must manually synchronize on either this class or the
|
||||||
|
@ -228,7 +228,7 @@ public class MultiMapUtils {
|
|||||||
* This method returns a new {@code MultiValuedMap} (decorating the
|
* This method returns a new {@code MultiValuedMap} (decorating the
|
||||||
* specified map) that will transform any new entries added to it. Existing
|
* specified map) that will transform any new entries added to it. Existing
|
||||||
* entries in the specified map will not be transformed. If you want that
|
* entries in the specified map will not be transformed. If you want that
|
||||||
* behaviour, see {@link TransformedMultiValuedMap#transformedMap}.
|
* behavior, see {@link TransformedMultiValuedMap#transformedMap}.
|
||||||
* <p>
|
* <p>
|
||||||
* Each object is passed through the transformers as it is added to the Map.
|
* Each object is passed through the transformers as it is added to the Map.
|
||||||
* It is important not to use the original map after invoking this method,
|
* It is important not to use the original map after invoking this method,
|
||||||
|
@ -475,7 +475,7 @@ public class PredicateUtils {
|
|||||||
/**
|
/**
|
||||||
* Gets a Predicate that throws an exception if the input object is null,
|
* Gets a Predicate that throws an exception if the input object is null,
|
||||||
* otherwise it calls the specified Predicate. This allows null handling
|
* otherwise it calls the specified Predicate. This allows null handling
|
||||||
* behaviour to be added to Predicates that don't support nulls.
|
* behavior to be added to Predicates that don't support nulls.
|
||||||
*
|
*
|
||||||
* @param <T> the type that the predicate queries
|
* @param <T> the type that the predicate queries
|
||||||
* @param predicate the predicate to wrap, may not be null
|
* @param predicate the predicate to wrap, may not be null
|
||||||
@ -489,7 +489,7 @@ public class PredicateUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a Predicate that returns false if the input object is null, otherwise
|
* Gets a Predicate that returns false if the input object is null, otherwise
|
||||||
* it calls the specified Predicate. This allows null handling behaviour to
|
* it calls the specified Predicate. This allows null handling behavior to
|
||||||
* be added to Predicates that don't support nulls.
|
* be added to Predicates that don't support nulls.
|
||||||
*
|
*
|
||||||
* @param <T> the type that the predicate queries
|
* @param <T> the type that the predicate queries
|
||||||
@ -504,7 +504,7 @@ public class PredicateUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a Predicate that returns true if the input object is null, otherwise
|
* Gets a Predicate that returns true if the input object is null, otherwise
|
||||||
* it calls the specified Predicate. This allows null handling behaviour to
|
* it calls the specified Predicate. This allows null handling behavior to
|
||||||
* be added to Predicates that don't support nulls.
|
* be added to Predicates that don't support nulls.
|
||||||
*
|
*
|
||||||
* @param <T> the type that the predicate queries
|
* @param <T> the type that the predicate queries
|
||||||
|
@ -113,7 +113,7 @@ public class QueueUtils {
|
|||||||
* method, as it is a backdoor for adding untransformed objects.
|
* method, as it is a backdoor for adding untransformed objects.
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified queue will not be transformed.
|
* Existing entries in the specified queue will not be transformed.
|
||||||
* If you want that behaviour, see {@link TransformedQueue#transformedQueue}.
|
* If you want that behavior, see {@link TransformedQueue#transformedQueue}.
|
||||||
*
|
*
|
||||||
* @param <E> the type of the elements in the queue
|
* @param <E> the type of the elements in the queue
|
||||||
* @param queue the queue to predicate, must not be null
|
* @param queue the queue to predicate, must not be null
|
||||||
|
@ -494,7 +494,7 @@ public class SetUtils {
|
|||||||
* method, as it is a backdoor for adding untransformed objects.
|
* method, as it is a backdoor for adding untransformed objects.
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified set will not be transformed.
|
* Existing entries in the specified set will not be transformed.
|
||||||
* If you want that behaviour, see {@link TransformedNavigableSet#transformedNavigableSet}.
|
* If you want that behavior, see {@link TransformedNavigableSet#transformedNavigableSet}.
|
||||||
*
|
*
|
||||||
* @param <E> the element type
|
* @param <E> the element type
|
||||||
* @param set the navigable set to transform, must not be null
|
* @param set the navigable set to transform, must not be null
|
||||||
@ -516,7 +516,7 @@ public class SetUtils {
|
|||||||
* method, as it is a backdoor for adding untransformed objects.
|
* method, as it is a backdoor for adding untransformed objects.
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified set will not be transformed.
|
* Existing entries in the specified set will not be transformed.
|
||||||
* If you want that behaviour, see {@link TransformedSet#transformedSet}.
|
* If you want that behavior, see {@link TransformedSet#transformedSet}.
|
||||||
*
|
*
|
||||||
* @param <E> the element type
|
* @param <E> the element type
|
||||||
* @param set the set to transform, must not be null
|
* @param set the set to transform, must not be null
|
||||||
@ -537,7 +537,7 @@ public class SetUtils {
|
|||||||
* method, as it is a backdoor for adding untransformed objects.
|
* method, as it is a backdoor for adding untransformed objects.
|
||||||
* <p>
|
* <p>
|
||||||
* Existing entries in the specified set will not be transformed.
|
* Existing entries in the specified set will not be transformed.
|
||||||
* If you want that behaviour, see {@link TransformedSortedSet#transformedSortedSet}.
|
* If you want that behavior, see {@link TransformedSortedSet#transformedSortedSet}.
|
||||||
*
|
*
|
||||||
* @param <E> the element type
|
* @param <E> the element type
|
||||||
* @param set the set to transform, must not be null
|
* @param set the set to transform, must not be null
|
||||||
|
@ -22,7 +22,7 @@ import org.apache.commons.collections4.Bag;
|
|||||||
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code Bag} to provide additional behaviour.
|
* Decorates another {@code Bag} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated bag.
|
* Methods are forwarded directly to the decorated bag.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Comparator;
|
|||||||
import org.apache.commons.collections4.SortedBag;
|
import org.apache.commons.collections4.SortedBag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code SortedBag} to provide additional behaviour.
|
* Decorates another {@code SortedBag} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated bag.
|
* Methods are forwarded directly to the decorated bag.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -22,7 +22,7 @@ import org.apache.commons.collections4.Bag;
|
|||||||
import org.apache.commons.collections4.collection.SynchronizedCollection;
|
import org.apache.commons.collections4.collection.SynchronizedCollection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@link Bag} to synchronize its behaviour
|
* Decorates another {@link Bag} to synchronize its behavior
|
||||||
* for a multi-threaded environment.
|
* for a multi-threaded environment.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are synchronized, then forwarded to the decorated bag.
|
* Methods are synchronized, then forwarded to the decorated bag.
|
||||||
|
@ -22,7 +22,7 @@ import org.apache.commons.collections4.Bag;
|
|||||||
import org.apache.commons.collections4.SortedBag;
|
import org.apache.commons.collections4.SortedBag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@link SortedBag} to synchronize its behaviour
|
* Decorates another {@link SortedBag} to synchronize its behavior
|
||||||
* for a multi-threaded environment.
|
* for a multi-threaded environment.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are synchronized, then forwarded to the decorated bag.
|
* Methods are synchronized, then forwarded to the decorated bag.
|
||||||
|
@ -190,7 +190,7 @@ public class DualTreeBidiMap<K, V> extends AbstractDualBidiMap<K, V>
|
|||||||
* Obtains an ordered map iterator.
|
* Obtains an ordered map iterator.
|
||||||
* <p>
|
* <p>
|
||||||
* This implementation copies the elements to an ArrayList in order to
|
* This implementation copies the elements to an ArrayList in order to
|
||||||
* provide the forward/backward behaviour.
|
* provide the forward/backward behavior.
|
||||||
*
|
*
|
||||||
* @return a new ordered map iterator
|
* @return a new ordered map iterator
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ final class BloomFilterIndexer {
|
|||||||
* <p>The index is assumed to be positive. For a positive index the result will match
|
* <p>The index is assumed to be positive. For a positive index the result will match
|
||||||
* {@code bitIndex / 64}.
|
* {@code bitIndex / 64}.
|
||||||
*
|
*
|
||||||
* <p>The divide is performed using bit shifts. If the input is negative the behaviour
|
* <p>The divide is performed using bit shifts. If the input is negative the behavior
|
||||||
* is not defined.
|
* is not defined.
|
||||||
*
|
*
|
||||||
* @param bitIndex the bit index (assumed to be positive)
|
* @param bitIndex the bit index (assumed to be positive)
|
||||||
@ -68,7 +68,7 @@ final class BloomFilterIndexer {
|
|||||||
* <p>The index is assumed to be positive. For a positive index the result will match
|
* <p>The index is assumed to be positive. For a positive index the result will match
|
||||||
* {@code 1L << (bitIndex % 64)}.
|
* {@code 1L << (bitIndex % 64)}.
|
||||||
*
|
*
|
||||||
* <p>If the input is negative the behaviour is not defined.
|
* <p>If the input is negative the behavior is not defined.
|
||||||
*
|
*
|
||||||
* @param bitIndex the bit index (assumed to be positive)
|
* @param bitIndex the bit index (assumed to be positive)
|
||||||
* @return the filter bit
|
* @return the filter bit
|
||||||
|
@ -23,11 +23,11 @@ import java.util.Objects;
|
|||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code Collection} to provide additional behaviour.
|
* Decorates another {@code Collection} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Each method call made on this {@code Collection} is forwarded to the
|
* Each method call made on this {@code Collection} is forwarded to the
|
||||||
* decorated {@code Collection}. This class is used as a framework on which
|
* decorated {@code Collection}. This class is used as a framework on which
|
||||||
* to build to extensions such as synchronized and unmodifiable behaviour. The
|
* to build to extensions such as synchronized and unmodifiable behavior. The
|
||||||
* main advantage of decoration is that one decorator can wrap any implementation
|
* main advantage of decoration is that one decorator can wrap any implementation
|
||||||
* of {@code Collection}, whereas sub-classing requires a new class to be
|
* of {@code Collection}, whereas sub-classing requires a new class to be
|
||||||
* written for each implementation.
|
* written for each implementation.
|
||||||
|
@ -23,7 +23,7 @@ import java.util.Objects;
|
|||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@link Collection} to synchronize its behaviour
|
* Decorates another {@link Collection} to synchronize its behavior
|
||||||
* for a multi-threaded environment.
|
* for a multi-threaded environment.
|
||||||
* <p>
|
* <p>
|
||||||
* Iterators must be manually synchronized:
|
* Iterators must be manually synchronized:
|
||||||
|
@ -29,7 +29,7 @@ import java.util.List;
|
|||||||
* 1) any single Comparator returns a non-zero result (and that result is then
|
* 1) any single Comparator returns a non-zero result (and that result is then
|
||||||
* returned), or 2) the ComparatorChain is exhausted (and zero is returned).
|
* returned), or 2) the ComparatorChain is exhausted (and zero is returned).
|
||||||
* This type of sorting is very similar to multi-column sorting in SQL, and this
|
* This type of sorting is very similar to multi-column sorting in SQL, and this
|
||||||
* class allows Java classes to emulate that kind of behaviour when sorting a
|
* class allows Java classes to emulate that kind of behavior when sorting a
|
||||||
* List.
|
* List.
|
||||||
* <p>
|
* <p>
|
||||||
* To further facilitate SQL-like sorting, the order of any single Comparator in
|
* To further facilitate SQL-like sorting, the order of any single Comparator in
|
||||||
|
@ -72,7 +72,7 @@ public class FixedOrderComparator<T> implements Comparator<T>, Serializable {
|
|||||||
/** Is the comparator locked against further change */
|
/** Is the comparator locked against further change */
|
||||||
private boolean isLocked = false;
|
private boolean isLocked = false;
|
||||||
|
|
||||||
/** The behaviour in the case of an unknown object */
|
/** The behavior in the case of an unknown object */
|
||||||
private UnknownObjectBehavior unknownObjectBehavior = UnknownObjectBehavior.EXCEPTION;
|
private UnknownObjectBehavior unknownObjectBehavior = UnknownObjectBehavior.EXCEPTION;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
@ -152,7 +152,7 @@ public class FixedOrderComparator<T> implements Comparator<T>, Serializable {
|
|||||||
/**
|
/**
|
||||||
* Sets the behavior for comparing unknown objects.
|
* Sets the behavior for comparing unknown objects.
|
||||||
*
|
*
|
||||||
* @param unknownObjectBehavior the flag for unknown behaviour -
|
* @param unknownObjectBehavior the flag for unknown behavior -
|
||||||
* UNKNOWN_AFTER, UNKNOWN_BEFORE or UNKNOWN_THROW_EXCEPTION
|
* UNKNOWN_AFTER, UNKNOWN_BEFORE or UNKNOWN_THROW_EXCEPTION
|
||||||
* @throws UnsupportedOperationException if a comparison has been performed
|
* @throws UnsupportedOperationException if a comparison has been performed
|
||||||
* @throws NullPointerException if unknownObjectBehavior is null
|
* @throws NullPointerException if unknownObjectBehavior is null
|
||||||
|
@ -19,7 +19,7 @@ package org.apache.commons.collections4.iterators;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides basic behaviour for decorating an iterator with extra functionality.
|
* Provides basic behavior for decorating an iterator with extra functionality.
|
||||||
* <p>
|
* <p>
|
||||||
* All methods are forwarded to the decorated iterator.
|
* All methods are forwarded to the decorated iterator.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@ import java.util.ListIterator;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides basic behaviour for decorating a list iterator with extra functionality.
|
* Provides basic behavior for decorating a list iterator with extra functionality.
|
||||||
* <p>
|
* <p>
|
||||||
* All methods are forwarded to the decorated list iterator.
|
* All methods are forwarded to the decorated list iterator.
|
||||||
*
|
*
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Objects;
|
|||||||
import org.apache.commons.collections4.MapIterator;
|
import org.apache.commons.collections4.MapIterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides basic behaviour for decorating a map iterator with extra functionality.
|
* Provides basic behavior for decorating a map iterator with extra functionality.
|
||||||
* <p>
|
* <p>
|
||||||
* All methods are forwarded to the decorated map iterator.
|
* All methods are forwarded to the decorated map iterator.
|
||||||
*
|
*
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Objects;
|
|||||||
import org.apache.commons.collections4.OrderedMapIterator;
|
import org.apache.commons.collections4.OrderedMapIterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides basic behaviour for decorating an ordered map iterator with extra functionality.
|
* Provides basic behavior for decorating an ordered map iterator with extra functionality.
|
||||||
* <p>
|
* <p>
|
||||||
* All methods are forwarded to the decorated map iterator.
|
* All methods are forwarded to the decorated map iterator.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@ import java.util.Iterator;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides basic behaviour for decorating an iterator with extra functionality
|
* Provides basic behavior for decorating an iterator with extra functionality
|
||||||
* without committing the generic type of the Iterator implementation.
|
* without committing the generic type of the Iterator implementation.
|
||||||
* <p>
|
* <p>
|
||||||
* All methods are forwarded to the decorated iterator.
|
* All methods are forwarded to the decorated iterator.
|
||||||
|
@ -784,7 +784,7 @@ public abstract class AbstractLinkedList<E> implements List<E> {
|
|||||||
* #previous()} haven't been called, or if the node has been removed
|
* #previous()} haven't been called, or if the node has been removed
|
||||||
* with {@link #remove()} or a new node added with {@link #add(Object)}.
|
* with {@link #remove()} or a new node added with {@link #add(Object)}.
|
||||||
* Should be accessed through {@link #getLastNodeReturned()} to enforce
|
* Should be accessed through {@link #getLastNodeReturned()} to enforce
|
||||||
* this behaviour.
|
* this behavior.
|
||||||
*/
|
*/
|
||||||
protected Node<E> current;
|
protected Node<E> current;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import java.util.ListIterator;
|
|||||||
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@link List} to provide additional behaviour.
|
* Decorates another {@link List} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated list.
|
* Methods are forwarded directly to the decorated list.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -42,7 +42,7 @@ import java.util.ListIterator;
|
|||||||
* methods provides access to a {@code Cursor} instance which extends
|
* methods provides access to a {@code Cursor} instance which extends
|
||||||
* {@code ListIterator}. The cursor allows changes to the list concurrent
|
* {@code ListIterator}. The cursor allows changes to the list concurrent
|
||||||
* with changes to the iterator. Note that the {@link #iterator()} method and
|
* with changes to the iterator. Note that the {@link #iterator()} method and
|
||||||
* sublists do <b>not</b> provide this cursor behaviour.
|
* sublists do <b>not</b> provide this cursor behavior.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* The {@code Cursor} class is provided partly for backwards compatibility
|
* The {@code Cursor} class is provided partly for backwards compatibility
|
||||||
@ -100,7 +100,7 @@ public class CursorableLinkedList<E> extends AbstractLinkedList<E> implements Se
|
|||||||
* <p>
|
* <p>
|
||||||
* If the underlying list is modified while iterating using this iterator
|
* If the underlying list is modified while iterating using this iterator
|
||||||
* a ConcurrentModificationException will occur.
|
* a ConcurrentModificationException will occur.
|
||||||
* The cursor behaviour is available via {@link #listIterator()}.
|
* The cursor behavior is available via {@link #listIterator()}.
|
||||||
*
|
*
|
||||||
* @return a new iterator that does <b>not</b> support concurrent modification
|
* @return a new iterator that does <b>not</b> support concurrent modification
|
||||||
*/
|
*/
|
||||||
|
@ -105,7 +105,7 @@ public class GrowthList<E> extends AbstractSerializableListDecorator<E> {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* Decorate the add method to perform the growth behaviour.
|
* Decorate the add method to perform the growth behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* If the requested index is greater than the current size, the list will
|
* If the requested index is greater than the current size, the list will
|
||||||
* grow to the new size. Indices between the old size and the requested
|
* grow to the new size. Indices between the old size and the requested
|
||||||
@ -133,7 +133,7 @@ public class GrowthList<E> extends AbstractSerializableListDecorator<E> {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* Decorate the addAll method to perform the growth behaviour.
|
* Decorate the addAll method to perform the growth behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* If the requested index is greater than the current size, the list will
|
* If the requested index is greater than the current size, the list will
|
||||||
* grow to the new size. Indices between the old size and the requested
|
* grow to the new size. Indices between the old size and the requested
|
||||||
@ -164,7 +164,7 @@ public class GrowthList<E> extends AbstractSerializableListDecorator<E> {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* Decorate the set method to perform the growth behaviour.
|
* Decorate the set method to perform the growth behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* If the requested index is greater than the current size, the list will
|
* If the requested index is greater than the current size, the list will
|
||||||
* grow to the new size. Indices between the old size and the requested
|
* grow to the new size. Indices between the old size and the requested
|
||||||
|
@ -132,7 +132,7 @@ public class LazyList<E> extends AbstractSerializableListDecorator<E> {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* Decorate the get method to perform the lazy behaviour.
|
* Decorate the get method to perform the lazy behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* If the requested index is greater than the current size, the list will
|
* If the requested index is greater than the current size, the list will
|
||||||
* grow to the new size and a new object will be returned from the factory
|
* grow to the new size and a new object will be returned from the factory
|
||||||
|
@ -65,7 +65,7 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
|
|||||||
* Factory method to create a SetList using the supplied list to retain order.
|
* Factory method to create a SetList using the supplied list to retain order.
|
||||||
* <p>
|
* <p>
|
||||||
* If the list contains duplicates, these are removed (first indexed one
|
* If the list contains duplicates, these are removed (first indexed one
|
||||||
* kept). A {@code HashSet} is used for the set behaviour.
|
* kept). A {@code HashSet} is used for the set behavior.
|
||||||
*
|
*
|
||||||
* @param <E> the element type
|
* @param <E> the element type
|
||||||
* @param list the list to decorate, must not be null
|
* @param list the list to decorate, must not be null
|
||||||
@ -116,7 +116,7 @@ public class SetUniqueList<E> extends AbstractSerializableListDecorator<E> {
|
|||||||
* <p>
|
* <p>
|
||||||
* <i>(Violation)</i> The {@code List} interface requires that this
|
* <i>(Violation)</i> The {@code List} interface requires that this
|
||||||
* method returns {@code true} always. However this class may return
|
* method returns {@code true} always. However this class may return
|
||||||
* {@code false} because of the {@code Set} behaviour.
|
* {@code false} because of the {@code Set} behavior.
|
||||||
*
|
*
|
||||||
* @param object the object to add
|
* @param object the object to add
|
||||||
* @return true if object was added
|
* @return true if object was added
|
||||||
|
@ -44,7 +44,7 @@ import org.apache.commons.collections4.iterators.EmptyMapIterator;
|
|||||||
* which can be overridden and replaced. The iterators can similarly be replaced,
|
* which can be overridden and replaced. The iterators can similarly be replaced,
|
||||||
* without the need to replace the KeySet, EntrySet and Values view classes.
|
* without the need to replace the KeySet, EntrySet and Values view classes.
|
||||||
* <p>
|
* <p>
|
||||||
* Overridable methods are provided to change the default hashing behaviour, and
|
* Overridable methods are provided to change the default hashing behavior, and
|
||||||
* to change how entries are added to and removed from the map. Hopefully, all you
|
* to change how entries are added to and removed from the map. Hopefully, all you
|
||||||
* need for unusual subclasses is here.
|
* need for unusual subclasses is here.
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -39,7 +39,7 @@ import org.apache.commons.collections4.iterators.EmptyOrderedMapIterator;
|
|||||||
* EntrySet and Values view classes.
|
* EntrySet and Values view classes.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Overridable methods are provided to change the default hashing behaviour, and
|
* Overridable methods are provided to change the default hashing behavior, and
|
||||||
* to change how entries are added to and removed from the map. Hopefully, all you
|
* to change how entries are added to and removed from the map. Hopefully, all you
|
||||||
* need for unusual subclasses is here.
|
* need for unusual subclasses is here.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -47,7 +47,7 @@ import org.apache.commons.collections4.keyvalue.DefaultMapEntry;
|
|||||||
* EntrySet and Values view classes.
|
* EntrySet and Values view classes.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Overridable methods are provided to change the default hashing behaviour, and
|
* Overridable methods are provided to change the default hashing behavior, and
|
||||||
* to change how entries are added to and removed from the map. Hopefully, all you
|
* to change how entries are added to and removed from the map. Hopefully, all you
|
||||||
* need for unusual subclasses is here.
|
* need for unusual subclasses is here.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -41,7 +41,7 @@ import org.apache.commons.collections4.functors.FactoryTransformer;
|
|||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* The defaulted value is not added to the map.
|
* The defaulted value is not added to the map.
|
||||||
* Compare this behaviour with {@link LazyMap}, which does add the value
|
* Compare this behavior with {@link LazyMap}, which does add the value
|
||||||
* to the map (via a Transformer).
|
* to the map (via a Transformer).
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -73,7 +73,7 @@ public class LRUMap<K, V>
|
|||||||
|
|
||||||
/** Maximum size */
|
/** Maximum size */
|
||||||
private transient int maxSize;
|
private transient int maxSize;
|
||||||
/** Scan behaviour */
|
/** Scan behavior */
|
||||||
private boolean scanUntilRemovable;
|
private boolean scanUntilRemovable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +46,7 @@ import org.apache.commons.collections4.keyvalue.MultiKey;
|
|||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* This map is implemented as a decorator of a {@code AbstractHashedMap} which
|
* This map is implemented as a decorator of a {@code AbstractHashedMap} which
|
||||||
* enables extra behaviour to be added easily.
|
* enables extra behavior to be added easily.
|
||||||
* </p>
|
* </p>
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@code MultiKeyMap.decorate(new LinkedMap())} creates an ordered map.
|
* <li>{@code MultiKeyMap.decorate(new LinkedMap())} creates an ordered map.
|
||||||
|
@ -28,11 +28,11 @@ import org.apache.commons.collections4.MultiSet;
|
|||||||
import org.apache.commons.collections4.MultiValuedMap;
|
import org.apache.commons.collections4.MultiValuedMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code MultiValuedMap} to provide additional behaviour.
|
* Decorates another {@code MultiValuedMap} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Each method call made on this {@code MultiValuedMap} is forwarded to the
|
* Each method call made on this {@code MultiValuedMap} is forwarded to the
|
||||||
* decorated {@code MultiValuedMap}. This class is used as a framework to build
|
* decorated {@code MultiValuedMap}. This class is used as a framework to build
|
||||||
* to extensions such as synchronized and unmodifiable behaviour.
|
* to extensions such as synchronized and unmodifiable behavior.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param <K> the type of key elements
|
* @param <K> the type of key elements
|
||||||
|
@ -22,7 +22,7 @@ import org.apache.commons.collections4.MultiSet;
|
|||||||
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code MultSet} to provide additional behaviour.
|
* Decorates another {@code MultSet} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated multiset.
|
* Methods are forwarded directly to the decorated multiset.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -22,7 +22,7 @@ import org.apache.commons.collections4.MultiSet;
|
|||||||
import org.apache.commons.collections4.collection.SynchronizedCollection;
|
import org.apache.commons.collections4.collection.SynchronizedCollection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@link MultiSet} to synchronize its behaviour
|
* Decorates another {@link MultiSet} to synchronize its behavior
|
||||||
* for a multi-threaded environment.
|
* for a multi-threaded environment.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are synchronized, then forwarded to the decorated multiset.
|
* Methods are synchronized, then forwarded to the decorated multiset.
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
{@link org.apache.commons.collections.Factory}<br />
|
{@link org.apache.commons.collections.Factory}<br />
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
A group of <i>functor</i> interfaces that provide plugin behaviour to various
|
A group of <i>functor</i> interfaces that provide plugin behavior to various
|
||||||
collections and utilities.
|
collections and utilities.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Queue;
|
|||||||
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@link Queue} to provide additional behaviour.
|
* Decorates another {@link Queue} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated queue.
|
* Methods are forwarded directly to the decorated queue.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Queue;
|
|||||||
import org.apache.commons.collections4.collection.SynchronizedCollection;
|
import org.apache.commons.collections4.collection.SynchronizedCollection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@link Queue} to synchronize its behaviour for a multi-threaded environment.
|
* Decorates another {@link Queue} to synchronize its behavior for a multi-threaded environment.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are synchronized, then forwarded to the decorated queue. Iterators must be separately synchronized around the
|
* Methods are synchronized, then forwarded to the decorated queue. Iterators must be separately synchronized around the
|
||||||
* loop.
|
* loop.
|
||||||
|
@ -20,7 +20,7 @@ import java.util.Iterator;
|
|||||||
import java.util.NavigableSet;
|
import java.util.NavigableSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code NavigableSet} to provide additional behaviour.
|
* Decorates another {@code NavigableSet} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated set.
|
* Methods are forwarded directly to the decorated set.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Set;
|
|||||||
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
import org.apache.commons.collections4.collection.AbstractCollectionDecorator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code Set} to provide additional behaviour.
|
* Decorates another {@code Set} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated set.
|
* Methods are forwarded directly to the decorated set.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -21,7 +21,7 @@ import java.util.Set;
|
|||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates another {@code SortedSet} to provide additional behaviour.
|
* Decorates another {@code SortedSet} to provide additional behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* Methods are forwarded directly to the decorated set.
|
* Methods are forwarded directly to the decorated set.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -106,7 +106,7 @@ public class ListOrderedSet<E>
|
|||||||
/**
|
/**
|
||||||
* Factory method to create an ordered set using the supplied list to retain order.
|
* Factory method to create an ordered set using the supplied list to retain order.
|
||||||
* <p>
|
* <p>
|
||||||
* A {@code HashSet} is used for the set behaviour.
|
* A {@code HashSet} is used for the set behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* NOTE: If the list contains duplicates, the duplicates are removed,
|
* NOTE: If the list contains duplicates, the duplicates are removed,
|
||||||
* altering the specified list.
|
* altering the specified list.
|
||||||
|
@ -25,7 +25,7 @@ import java.util.Set;
|
|||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorates a {@code Map} to obtain {@code Set} behaviour.
|
* Decorates a {@code Map} to obtain {@code Set} behavior.
|
||||||
* <p>
|
* <p>
|
||||||
* This class is used to create a {@code Set} with the same properties as
|
* This class is used to create a {@code Set} with the same properties as
|
||||||
* the key set of any map. Thus, a ReferenceSet can be created by wrapping a
|
* the key set of any map. Thus, a ReferenceSet can be created by wrapping a
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Many Jakarta projects have needs or design criteria that extend
|
Many Jakarta projects have needs or design criteria that extend
|
||||||
beyond the core Collections API, such as introducing new abstract
|
beyond the core Collections API, such as introducing new abstract
|
||||||
data types (e.g., Avalon's BinaryHeap) or changing the behaviour of
|
data types (e.g., Avalon's BinaryHeap) or changing the behavior of
|
||||||
existing abstract data types (e.g., Struts' FastHashMap).
|
existing abstract data types (e.g., Struts' FastHashMap).
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
list</a>.</p>
|
list</a>.</p>
|
||||||
|
|
||||||
<p>If you have encountered an unlisted security vulnerability
|
<p>If you have encountered an unlisted security vulnerability
|
||||||
or other unexpected behaviour that has security impact, or if
|
or other unexpected behavior that has security impact, or if
|
||||||
the descriptions here are incomplete, please report them
|
the descriptions here are incomplete, please report them
|
||||||
privately to the Apache Security Team. Thank you.</p>
|
privately to the Apache Security Team. Thank you.</p>
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public class BloomFilterIndexerTest {
|
|||||||
// getLongIndex is expected to identify a block of 64-bits (starting from zero)
|
// getLongIndex is expected to identify a block of 64-bits (starting from zero)
|
||||||
Assert.assertEquals(index / Long.SIZE, BloomFilterIndexer.getLongIndex(index));
|
Assert.assertEquals(index / Long.SIZE, BloomFilterIndexer.getLongIndex(index));
|
||||||
|
|
||||||
// Verify the behaviour for negatives. It should produce a negative (invalid)
|
// Verify the behavior for negatives. It should produce a negative (invalid)
|
||||||
// as a simple trip for incorrect usage.
|
// as a simple trip for incorrect usage.
|
||||||
Assert.assertTrue(BloomFilterIndexer.getLongIndex(-index) < 0);
|
Assert.assertTrue(BloomFilterIndexer.getLongIndex(-index) < 0);
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ public class BloomFilterIndexerTest {
|
|||||||
// getLongBit is expected to identify a single bit in a 64-bit block
|
// getLongBit is expected to identify a single bit in a 64-bit block
|
||||||
Assert.assertEquals(1L << (index % Long.SIZE), BloomFilterIndexer.getLongBit(index));
|
Assert.assertEquals(1L << (index % Long.SIZE), BloomFilterIndexer.getLongBit(index));
|
||||||
|
|
||||||
// Verify the behaviour for negatives
|
// Verify the behavior for negatives
|
||||||
Assert.assertEquals(1L << (64 - (index & 0x3f)), BloomFilterIndexer.getLongBit(-index));
|
Assert.assertEquals(1L << (64 - (index & 0x3f)), BloomFilterIndexer.getLongBit(-index));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ public abstract class AbstractIteratorTest<E> extends AbstractObjectTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test normal iteration behaviour.
|
* Test normal iteration behavior.
|
||||||
*/
|
*/
|
||||||
public void testFullIterator() {
|
public void testFullIterator() {
|
||||||
if (!supportsFullIterator()) {
|
if (!supportsFullIterator()) {
|
||||||
@ -157,7 +157,7 @@ public abstract class AbstractIteratorTest<E> extends AbstractObjectTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test remove behaviour.
|
* Test remove behavior.
|
||||||
*/
|
*/
|
||||||
public void testRemove() {
|
public void testRemove() {
|
||||||
final Iterator<E> it = makeObject();
|
final Iterator<E> it = makeObject();
|
||||||
|
@ -156,7 +156,7 @@ public abstract class AbstractListIteratorTest<E> extends AbstractIteratorTest<E
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test add behaviour.
|
* Test add behavior.
|
||||||
*/
|
*/
|
||||||
public void testAdd() {
|
public void testAdd() {
|
||||||
ListIterator<E> it = makeObject();
|
ListIterator<E> it = makeObject();
|
||||||
@ -193,7 +193,7 @@ public abstract class AbstractListIteratorTest<E> extends AbstractIteratorTest<E
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test set behaviour.
|
* Test set behavior.
|
||||||
*/
|
*/
|
||||||
public void testSet() {
|
public void testSet() {
|
||||||
final ListIterator<E> it = makeObject();
|
final ListIterator<E> it = makeObject();
|
||||||
@ -250,7 +250,7 @@ public abstract class AbstractListIteratorTest<E> extends AbstractIteratorTest<E
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test remove after add behaviour.
|
* Test remove after add behavior.
|
||||||
*/
|
*/
|
||||||
public void testAddThenRemove() {
|
public void testAddThenRemove() {
|
||||||
final ListIterator<E> it = makeObject();
|
final ListIterator<E> it = makeObject();
|
||||||
|
@ -91,7 +91,7 @@ public abstract class AbstractMapEntryTest<K, V> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subclasses should override this method to test the
|
* Subclasses should override this method to test the
|
||||||
* desired behaviour of the class with respect to
|
* desired behavior of the class with respect to
|
||||||
* handling of self-references.
|
* handling of self-references.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -113,7 +113,7 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testCollectionAddAll() {
|
public void testCollectionAddAll() {
|
||||||
// override for set behaviour
|
// override for set behavior
|
||||||
resetEmpty();
|
resetEmpty();
|
||||||
E[] elements = getFullElements();
|
E[] elements = getFullElements();
|
||||||
boolean r = getCollection().addAll(Arrays.asList(elements));
|
boolean r = getCollection().addAll(Arrays.asList(elements));
|
||||||
@ -300,7 +300,7 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testListIteratorAdd() {
|
public void testListIteratorAdd() {
|
||||||
// override to cope with Set behaviour
|
// override to cope with Set behavior
|
||||||
resetEmpty();
|
resetEmpty();
|
||||||
final List<E> list1 = getCollection();
|
final List<E> list1 = getCollection();
|
||||||
final List<E> list2 = getConfirmed();
|
final List<E> list2 = getConfirmed();
|
||||||
@ -343,7 +343,7 @@ public class SetUniqueListTest<E> extends AbstractListTest<E> {
|
|||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void testListSetByIndex() {
|
public void testListSetByIndex() {
|
||||||
// override for set behaviour
|
// override for set behavior
|
||||||
resetFull();
|
resetFull();
|
||||||
final int size = getCollection().size();
|
final int size = getCollection().size();
|
||||||
getCollection().set(0, (E) new Long(1000));
|
getCollection().set(0, (E) new Long(1000));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user