Add @SuppressWarnings("unchecked")
This commit is contained in:
parent
efce331acd
commit
4b5245dbce
|
@ -43,6 +43,7 @@ public interface FailableBiConsumer<T, U, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, U, E extends Throwable> FailableBiConsumer<T, U, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public interface FailableBiFunction<T, U, R, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, U, R, E extends Throwable> FailableBiFunction<T, U, R, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ public interface FailableBiPredicate<T, U, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, U, E extends Throwable> FailableBiPredicate<T, U, E> falsePredicate() {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -59,6 +60,7 @@ public interface FailableBiPredicate<T, U, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, U, E extends Throwable> FailableBiPredicate<T, U, E> truePredicate() {
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public interface FailableConsumer<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailableConsumer<T, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ public interface FailableDoubleConsumer<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableDoubleConsumer<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public interface FailableDoubleFunction<R, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <R, E extends Throwable> FailableDoubleFunction<R, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,8 @@ public interface FailableDoublePredicate<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
static <E extends Throwable> FailableDoublePredicate<E> falsePredicate() {
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableDoublePredicate<E> falsePredicate() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -53,7 +54,8 @@ public interface FailableDoublePredicate<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
static <E extends Throwable> FailableDoublePredicate<E> truePredicate() {
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableDoublePredicate<E> truePredicate() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ public interface FailableDoubleToIntFunction<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
static <E extends Throwable> FailableDoubleToIntFunction<E> nop() {
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableDoubleToIntFunction<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ public interface FailableDoubleToLongFunction<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableDoubleToLongFunction<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public interface FailableDoubleUnaryOperator<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableDoubleUnaryOperator<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public interface FailableFunction<T, R, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, R, E extends Throwable> FailableFunction<T, R, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ public interface FailableIntConsumer<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableIntConsumer<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public interface FailableIntFunction<R, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <R, E extends Throwable> FailableIntFunction<R, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ public interface FailableIntPredicate<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableIntPredicate<E> falsePredicate() {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -53,6 +54,7 @@ public interface FailableIntPredicate<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableIntPredicate<E> truePredicate() {
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public interface FailableIntToDoubleFunction<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableIntToDoubleFunction<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public interface FailableIntToLongFunction<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableIntToLongFunction<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public interface FailableIntUnaryOperator<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableIntUnaryOperator<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ public interface FailableLongConsumer<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableLongConsumer<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ public interface FailableLongFunction<R, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
static <R, E extends Throwable> FailableLongFunction<R, E> nop() {
|
||||
@SuppressWarnings("unchecked")
|
||||
static <R, E extends Throwable> FailableLongFunction<R, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ public interface FailableLongPredicate<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
static <E extends Throwable> FailableLongPredicate<E> falsePredicate() {
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableLongPredicate<E> falsePredicate() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -53,6 +54,7 @@ public interface FailableLongPredicate<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableLongPredicate<E> truePredicate() {
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public interface FailableLongToDoubleFunction<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableLongToDoubleFunction<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public interface FailableLongToIntFunction<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableLongToIntFunction<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,8 @@ public interface FailableLongUnaryOperator<E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
static <E extends Throwable> FailableLongUnaryOperator<E> nop() {
|
||||
@SuppressWarnings("unchecked")
|
||||
static <E extends Throwable> FailableLongUnaryOperator<E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,8 @@ public interface FailableObjDoubleConsumer<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
static <T, E extends Throwable> FailableObjDoubleConsumer<T, E> nop() {
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailableObjDoubleConsumer<T, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ public interface FailableObjIntConsumer<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailableObjIntConsumer<T, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public interface FailableObjLongConsumer<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailableObjLongConsumer<T, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ public interface FailablePredicate<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailablePredicate<T, E> falsePredicate() {
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -56,6 +57,7 @@ public interface FailablePredicate<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailablePredicate<T, E> truePredicate() {
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ public interface FailableToDoubleBiFunction<T, U, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, U, E extends Throwable> FailableToDoubleBiFunction<T, U, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public interface FailableToDoubleFunction<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailableToDoubleFunction<T, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ public interface FailableToIntBiFunction<T, U, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, U, E extends Throwable> FailableToIntBiFunction<T, U, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public interface FailableToIntFunction<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailableToIntFunction<T, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ public interface FailableToLongBiFunction<T, U, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, U, E extends Throwable> FailableToLongBiFunction<T, U, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public interface FailableToLongFunction<T, E extends Throwable> {
|
|||
* @param <E> Thrown exception.
|
||||
* @return The NOP singleton.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
static <T, E extends Throwable> FailableToLongFunction<T, E> nop() {
|
||||
return NOP;
|
||||
}
|
||||
|
|
|
@ -94,6 +94,7 @@ public final class ImmutablePair<L, R> extends Pair<L, R> {
|
|||
* @return an immutable pair of nulls.
|
||||
* @since 3.6
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <L, R> ImmutablePair<L, R> nullPair() {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ public final class ImmutableTriple<L, M, R> extends Triple<L, M, R> {
|
|||
* @return an immutable triple of nulls.
|
||||
* @since 3.6
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <L, M, R> ImmutableTriple<L, M, R> nullTriple() {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue