Consistent javadoc param declarations for type variables
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,8 +24,8 @@ package org.springframework.core.convert.converter;
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @see ConditionalConverter
|
||||
* @param <S> The source type converters created by this factory can convert from
|
||||
* @param <R> The target range (or base) type converters created by this factory can convert to;
|
||||
* @param <S> the source type converters created by this factory can convert from
|
||||
* @param <R> the target range (or base) type converters created by this factory can convert to;
|
||||
* for example {@link Number} for a set of number subtypes.
|
||||
*/
|
||||
public interface ConverterFactory<S, R> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,9 +29,9 @@ import org.springframework.util.comparator.ComparableComparator;
|
||||
* {@code Comparator}.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 3.2
|
||||
* @param <S> the source type
|
||||
* @param <T> the target type
|
||||
* @since 3.2
|
||||
*/
|
||||
public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
|
||||
@@ -42,7 +42,6 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
|
||||
/**
|
||||
* Create a new {@link ConvertingComparator} instance.
|
||||
*
|
||||
* @param converter the converter
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -52,7 +51,6 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
|
||||
/**
|
||||
* Create a new {@link ConvertingComparator} instance.
|
||||
*
|
||||
* @param comparator the underlying comparator used to compare the converted values
|
||||
* @param converter the converter
|
||||
*/
|
||||
@@ -65,15 +63,14 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
|
||||
/**
|
||||
* Create a new {@link ComparableComparator} instance.
|
||||
*
|
||||
* @param comparator the underlying comparator
|
||||
* @param conversionService the conversion service
|
||||
* @param targetType the target type
|
||||
*/
|
||||
public ConvertingComparator(Comparator<T> comparator,
|
||||
ConversionService conversionService, Class<? extends T> targetType) {
|
||||
this(comparator, new ConversionServiceConverter<S, T>(
|
||||
conversionService, targetType));
|
||||
public ConvertingComparator(
|
||||
Comparator<T> comparator, ConversionService conversionService, Class<? extends T> targetType) {
|
||||
|
||||
this(comparator, new ConversionServiceConverter<S, T>(conversionService, targetType));
|
||||
}
|
||||
|
||||
|
||||
@@ -87,14 +84,11 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
/**
|
||||
* Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry
|
||||
* map * entries} based on their {@link java.util.Map.Entry#getKey() keys}.
|
||||
*
|
||||
* @param comparator the underlying comparator used to compare keys
|
||||
* @return a new {@link ConvertingComparator} instance
|
||||
*/
|
||||
public static <K, V> ConvertingComparator<Map.Entry<K, V>, K> mapEntryKeys(
|
||||
Comparator<K> comparator) {
|
||||
public static <K, V> ConvertingComparator<Map.Entry<K, V>, K> mapEntryKeys(Comparator<K> comparator) {
|
||||
return new ConvertingComparator<Map.Entry<K,V>, K>(comparator, new Converter<Map.Entry<K, V>, K>() {
|
||||
|
||||
@Override
|
||||
public K convert(Map.Entry<K, V> source) {
|
||||
return source.getKey();
|
||||
@@ -105,14 +99,11 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
/**
|
||||
* Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry
|
||||
* map entries} based on their {@link java.util.Map.Entry#getValue() values}.
|
||||
*
|
||||
* @param comparator the underlying comparator used to compare values
|
||||
* @return a new {@link ConvertingComparator} instance
|
||||
*/
|
||||
public static <K, V> ConvertingComparator<Map.Entry<K, V>, V> mapEntryValues(
|
||||
Comparator<V> comparator) {
|
||||
public static <K, V> ConvertingComparator<Map.Entry<K, V>, V> mapEntryValues(Comparator<V> comparator) {
|
||||
return new ConvertingComparator<Map.Entry<K,V>, V>(comparator, new Converter<Map.Entry<K, V>, V>() {
|
||||
|
||||
@Override
|
||||
public V convert(Map.Entry<K, V> source) {
|
||||
return source.getValue();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,9 +27,9 @@ import org.springframework.util.Assert;
|
||||
* <p>This is the most flexible of the Converter SPI interfaces, but also the most complex.
|
||||
* It is flexible in that a GenericConverter may support converting between multiple source/target
|
||||
* type pairs (see {@link #getConvertibleTypes()}. In addition, GenericConverter implementations
|
||||
* have access to source/target {@link TypeDescriptor field context} during the type conversion process.
|
||||
* This allows for resolving source and target field metadata such as annotations and generics
|
||||
* information, which can be used influence the conversion logic.
|
||||
* have access to source/target {@link TypeDescriptor field context} during the type conversion
|
||||
* process. This allows for resolving source and target field metadata such as annotations and
|
||||
* generics information, which can be used influence the conversion logic.
|
||||
*
|
||||
* <p>This interface should generally not be used when the simpler {@link Converter} or
|
||||
* {@link ConverterFactory} interfaces are sufficient.
|
||||
@@ -49,9 +49,8 @@ public interface GenericConverter {
|
||||
/**
|
||||
* Return the source and target types which this converter can convert between. Each
|
||||
* entry is a convertible source-to-target type pair.
|
||||
* <p>
|
||||
* For {@link ConditionalConverter conditional} converters this method may return
|
||||
* {@code null} to indicate all source-to-target pairs should be considered. *
|
||||
* <p>For {@link ConditionalConverter conditional} converters this method may return
|
||||
* {@code null} to indicate all source-to-target pairs should be considered.
|
||||
*/
|
||||
Set<ConvertiblePair> getConvertibleTypes();
|
||||
|
||||
@@ -95,25 +94,25 @@ public interface GenericConverter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null || obj.getClass() != ConvertiblePair.class) {
|
||||
if (other == null || other.getClass() != ConvertiblePair.class) {
|
||||
return false;
|
||||
}
|
||||
ConvertiblePair other = (ConvertiblePair) obj;
|
||||
return this.sourceType.equals(other.sourceType) && this.targetType.equals(other.targetType);
|
||||
ConvertiblePair otherPair = (ConvertiblePair) other;
|
||||
return (this.sourceType.equals(otherPair.sourceType) && this.targetType.equals(otherPair.targetType));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.sourceType.hashCode() * 31 + this.targetType.hashCode();
|
||||
return (this.sourceType.hashCode() * 31 + this.targetType.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.sourceType.getName() + " -> " + this.targetType.getName();
|
||||
return (this.sourceType.getName() + " -> " + this.targetType.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -51,10 +51,10 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
* <p>If not explicitly specified, this implementation will use
|
||||
* {@linkplain SoftReference soft entry references}.
|
||||
*
|
||||
* @param <K> The key type
|
||||
* @param <V> The value type
|
||||
* @author Phillip Webb
|
||||
* @since 3.2
|
||||
* @param <K> the key type
|
||||
* @param <V> the value type
|
||||
*/
|
||||
public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implements ConcurrentMap<K, V> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,8 +32,8 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 3.2
|
||||
* @param <T> the type of objects being compared
|
||||
* @see CompoundComparator
|
||||
* @param <T> the type of objects being compared
|
||||
*/
|
||||
public class InstanceComparator<T> implements Comparator<T> {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,10 +25,10 @@ import java.util.concurrent.ExecutionException;
|
||||
* and {@link ListenableFutureCallback#onSuccess(Object)} call {@link #adapt(Object)}
|
||||
* on the adaptee's result.
|
||||
*
|
||||
* @param <T> the type of this {@code Future}
|
||||
* @param <S> the type of the adaptee's {@code Future}
|
||||
* @author Arjen Poutsma
|
||||
* @since 4.0
|
||||
* @param <T> the type of this {@code Future}
|
||||
* @param <S> the type of the adaptee's {@code Future}
|
||||
*/
|
||||
public abstract class ListenableFutureAdapter<T, S> extends FutureAdapter<T, S> implements ListenableFuture<T> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user