Remove: Unnecessary @SuppressWarnings("unchecked").
This commit is contained in:
parent
291414cd57
commit
a434957f70
|
@ -66,7 +66,6 @@ public class ChainedTransformer<T> implements Transformer<T, T>, Serializable {
|
|||
* @throws NullPointerException if the transformers collection is null
|
||||
* @throws NullPointerException if any transformer in the collection is null
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Transformer<T, T> chainedTransformer(
|
||||
final Collection<? extends Transformer<? super T, ? extends T>> transformers) {
|
||||
if (transformers == null) {
|
||||
|
|
|
@ -45,7 +45,6 @@ public class CloneTransformer<T> implements Transformer<T, T> {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // the singleton instance works for all types
|
||||
public static <T> Transformer<T, T> cloneTransformer() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ public class ConstantFactory<T> implements Factory<T>, Serializable {
|
|||
* @param constantToReturn the constant object to return each time in the factory
|
||||
* @return the <code>constant</code> factory.
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // The null factory works for all object types
|
||||
public static <T> Factory<T> constantFactory(final T constantToReturn) {
|
||||
if (constantToReturn == null) {
|
||||
return NULL_INSTANCE;
|
||||
|
|
|
@ -49,7 +49,6 @@ public class ConstantTransformer<I, O> implements Transformer<I, O>, Serializabl
|
|||
* @param <O> the output type
|
||||
* @return Transformer<I, O> that always returns null.
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // The null transformer works for all object types
|
||||
public static <I, O> Transformer<I, O> nullTransformer() {
|
||||
return NULL_INSTANCE;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ public class DefaultEquator<T> implements Equator<T>, Serializable {
|
|||
* @param <T> the object type
|
||||
* @return the singleton instance
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // the static instance works for all types
|
||||
public static <T> DefaultEquator<T> defaultEquator() {
|
||||
return DefaultEquator.INSTANCE;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ public final class ExceptionClosure<E> implements Closure<E>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // the static instance works for all types
|
||||
public static <E> Closure<E> exceptionClosure() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ public final class ExceptionFactory<T> implements Factory<T>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // the static instance works for all types
|
||||
public static <T> Factory<T> exceptionFactory() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ public final class ExceptionPredicate<T> implements Predicate<T>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // the static instance works for all types
|
||||
public static <T> Predicate<T> exceptionPredicate() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ public final class ExceptionTransformer<I, O> implements Transformer<I, O>, Seri
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // the static instance works for all types
|
||||
public static <I, O> Transformer<I, O> exceptionTransformer() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public final class FalsePredicate<T> implements Predicate<T>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 4.0
|
||||
*/
|
||||
@SuppressWarnings("unchecked") // the static instance works for all types
|
||||
public static <T> Predicate<T> falsePredicate() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ public class InstantiateTransformer<T> implements Transformer<Class<? extends T>
|
|||
* @param <T> the type of the objects to be created
|
||||
* @return Transformer<Class<? extends T>, T>
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() {
|
||||
return NO_ARG_INSTANCE;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public final class NOPClosure<E> implements Closure<E>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> Closure<E> nopClosure() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public class NOPTransformer<T> implements Transformer<T, T>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Transformer<T, T> nopTransformer() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public final class NotNullPredicate<T> implements Predicate<T>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Predicate<T> notNullPredicate() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public final class NullPredicate<T> implements Predicate<T>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Predicate<T> nullPredicate() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,6 @@ public final class TruePredicate<T> implements Predicate<T>, Serializable {
|
|||
* @return the singleton instance
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Predicate<T> truePredicate() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue