org.infinispan.util.Casting Maven / Gradle / Ivy
package org.infinispan.util;
import org.infinispan.util.function.SerializableSupplier;
import java.util.function.Supplier;
import java.util.stream.Collector;
public class Casting {
// The hacks here allow casts to work properly,
// since Java doesn't work as well with nested generics
@SuppressWarnings("unchecked")
public static SerializableSupplier> toSerialSupplierCollect(
SerializableSupplier supplier) {
return supplier;
}
// This is a hack to allow for cast to work properly, since Java doesn't work as well with nested generics
@SuppressWarnings("unchecked")
public static Supplier> toSupplierCollect(Supplier supplier) {
return supplier;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy