Add missing since tags.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1479407 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-05-05 22:07:53 +00:00
parent fc502e2479
commit 0fc05eb81d
16 changed files with 24 additions and 2 deletions

View File

@ -81,6 +81,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> implements Se
* @param defaultValue the default value to return when the key is not found
* @return a new defaulting map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> DefaultedMap<K, V> defaultedMap(final Map<K, V> map, final V defaultValue) {
return new DefaultedMap<K, V>(map, ConstantTransformer.constantTransformer(defaultValue));
@ -98,6 +99,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> implements Se
* @param factory the factory to use to create entries, must not be null
* @return a new defaulting map
* @throws IllegalArgumentException if map or factory is null
* @since 4.0
*/
public static <K, V> DefaultedMap<K, V> defaultedMap(final Map<K, V> map, final Factory<? extends V> factory) {
if (factory == null) {
@ -119,6 +121,7 @@ public class DefaultedMap<K, V> extends AbstractMapDecorator<K, V> implements Se
* @param transformer the transformer to use as a factory to create entries, must not be null
* @return a new defaulting map
* @throws IllegalArgumentException if map or factory is null
* @since 4.0
*/
public static <K, V> Map<K, V> defaultedMap(final Map<K, V> map,
final Transformer<? super K, ? extends V> transformer) {

View File

@ -67,6 +67,7 @@ public class FixedSizeMap<K, V>
* @param map the map to decorate, must not be null
* @return a new fixed size map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> FixedSizeMap<K, V> fixedSizeMap(final Map<K, V> map) {
return new FixedSizeMap<K, V>(map);

View File

@ -69,6 +69,7 @@ public class FixedSizeSortedMap<K, V>
* @param map the map to decorate, must not be null
* @return a new fixed size sorted map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> FixedSizeSortedMap<K, V> fixedSizeSortedMap(final SortedMap<K, V> map) {
return new FixedSizeSortedMap<K, V>(map);

View File

@ -76,6 +76,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Map<K,
* @param factory the factory to use, must not be null
* @return a new lazy map
* @throws IllegalArgumentException if map or factory is null
* @since 4.0
*/
public static <K, V> LazyMap<K, V> lazyMap(final Map<K, V> map, final Factory< ? extends V> factory) {
return new LazyMap<K,V>(map, factory);
@ -90,6 +91,7 @@ public class LazyMap<K, V> extends AbstractMapDecorator<K, V> implements Map<K,
* @param factory the factory to use, must not be null
* @return a new lazy map
* @throws IllegalArgumentException if map or factory is null
* @since 4.0
*/
public static <V, K> LazyMap<K, V> lazyMap(final Map<K, V> map, final Transformer<? super K, ? extends V> factory) {
return new LazyMap<K,V>(map, factory);

View File

@ -70,6 +70,7 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
* @param factory the factory to use, must not be null
* @return a new lazy sorted map
* @throws IllegalArgumentException if map or factory is null
* @since 4.0
*/
public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map,
final Factory<? extends V> factory) {
@ -85,6 +86,7 @@ public class LazySortedMap<K,V> extends LazyMap<K,V> implements SortedMap<K,V> {
* @param factory the factory to use, must not be null
* @return a new lazy sorted map
* @throws IllegalArgumentException if map or factory is null
* @since 4.0
*/
public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map,
final Transformer<? super K, ? extends V> factory) {

View File

@ -95,6 +95,7 @@ public class ListOrderedMap<K, V>
* @param map the map to decorate, must not be null
* @return a new list ordered map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> ListOrderedMap<K, V> listOrderedMap(final Map<K, V> map) {
return new ListOrderedMap<K, V>(map);

View File

@ -91,6 +91,7 @@ public class MultiKeyMap<K, V> extends AbstractMapDecorator<MultiKey<? extends K
* @param map the map to decorate, not null
* @return a new multi key map
* @throws IllegalArgumentException if the map is null or not empty
* @since 4.0
*/
public static <K, V> MultiKeyMap<K, V> multiKeyMap(final AbstractHashedMap<MultiKey<? extends K>, V> map) {
if (map == null) {

View File

@ -81,6 +81,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
* @param <V> the value type
* @param map the map to wrap
* @return a new multi-value map
* @since 4.0
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
public static <K, V> MultiValueMap<K, V> multiValueMap(final Map<K, ? super Collection<V>> map) {
@ -97,6 +98,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
* @param map the map to wrap
* @param collectionClass the type of the collection class
* @return a new multi-value map
* @since 4.0
*/
public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(final Map<K, ? super C> map,
final Class<C> collectionClass) {
@ -113,6 +115,7 @@ public class MultiValueMap<K, V> extends AbstractMapDecorator<K, Object> impleme
* @param map the map to decorate
* @param collectionFactory the collection factory (must return a Collection object).
* @return a new multi-value map
* @since 4.0
*/
public static <K, V, C extends Collection<V>> MultiValueMap<K, V> multiValueMap(final Map<K, ? super C> map,
final Factory<C> collectionFactory) {

View File

@ -73,6 +73,7 @@ public class PredicatedMap<K, V>
* @param valuePredicate the predicate to validate to values, null means no check
* @return a new predicated map
* @throws IllegalArgumentException if the map is null
* @since 4.0
*/
public static <K, V> PredicatedMap<K, V> predicatedMap(final Map<K, V> map,
final Predicate<? super K> keyPredicate,

View File

@ -61,6 +61,7 @@ public class PredicatedSortedMap<K, V> extends PredicatedMap<K, V> implements So
* @param valuePredicate the predicate to validate to values, null means no check
* @return a new predicated sorted map
* @throws IllegalArgumentException if the map is null
* @since 4.0
*/
public static <K, V> PredicatedSortedMap<K, V> predicatedSortedMap(final SortedMap<K, V> map,
final Predicate<? super K> keyPredicate, final Predicate<? super V> valuePredicate) {

View File

@ -71,6 +71,7 @@ public class TransformedMap<K, V>
* @param valueTransformer the transformer to use for value conversion, null means no transformation
* @return a new transformed map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> TransformedMap<K, V> transformingMap(final Map<K, V> map,
final Transformer<? super K, ? extends K> keyTransformer,
@ -93,7 +94,7 @@ public class TransformedMap<K, V>
* @param valueTransformer the transformer to use for value conversion, null means no transformation
* @return a new transformed map
* @throws IllegalArgumentException if map is null
* @since 3.2
* @since 4.0
*/
public static <K, V> TransformedMap<K, V> transformedMap(final Map<K, V> map,
final Transformer<? super K, ? extends K> keyTransformer,

View File

@ -61,6 +61,7 @@ public class TransformedSortedMap<K, V>
* @param valueTransformer the predicate to validate to values, null means no transformation
* @return a new transformed sorted map
* @throws IllegalArgumentException if the map is null
* @since 4.0
*/
public static <K, V> TransformedSortedMap<K, V> transformingSortedMap(final SortedMap<K, V> map,
final Transformer<? super K, ? extends K> keyTransformer,
@ -83,7 +84,7 @@ public class TransformedSortedMap<K, V>
* @param valueTransformer the transformer to use for value conversion, null means no transformation
* @return a new transformed sorted map
* @throws IllegalArgumentException if map is null
* @since 3.2
* @since 4.0
*/
public static <K, V> TransformedSortedMap<K, V> transformedSortedMap(final SortedMap<K, V> map,
final Transformer<? super K, ? extends K> keyTransformer,

View File

@ -49,6 +49,7 @@ public final class UnmodifiableEntrySet<K, V>
* @param set the set to decorate, must not be null
* @return a new unmodifiable entry set
* @throws IllegalArgumentException if set is null
* @since 4.0
*/
public static <K, V> Set<Map.Entry<K, V>> unmodifiableEntrySet(final Set<Map.Entry<K, V>> set) {
if (set instanceof Unmodifiable) {

View File

@ -57,6 +57,7 @@ public final class UnmodifiableMap<K, V>
* @param map the map to decorate, must not be null
* @return a new unmodifiable map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> Map<K, V> unmodifiableMap(final Map<K, V> map) {
if (map instanceof Unmodifiable) {

View File

@ -55,6 +55,7 @@ public final class UnmodifiableOrderedMap<K, V> extends AbstractOrderedMapDecora
* @param map the map to decorate, must not be null
* @return a new ordered map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> OrderedMap<K, V> unmodifiableOrderedMap(final OrderedMap<K, V> map) {
if (map instanceof Unmodifiable) {

View File

@ -55,6 +55,7 @@ public final class UnmodifiableSortedMap<K, V>
* @param map the map to decorate, must not be null
* @return a new unmodifiable sorted map
* @throws IllegalArgumentException if map is null
* @since 4.0
*/
public static <K, V> SortedMap<K, V> unmodifiableSortedMap(final SortedMap<K, V> map) {
if (map instanceof Unmodifiable) {