src/share/classes/java/util/function/LongBlock.java

Print this page
rev 6189 : 8004015: Add Extends and deaults for basic functional interface types
Summary: Adds the appropriate extends and default methods for  core functional interfaces used by the JSR335 libraries.
Reviewed-by: duke

*** 27,41 **** /** * An operation upon a {@code long} input value. The operation may modify * external state. * * <p/>This is the primitive type specialization of {@link Block} for ! * {@code long} and also may be used as a {@code Block<Long>}. * * @since 1.8 */ ! public interface LongBlock { /** * Use the {@code long} input value in an operation which may modify * external state. * --- 27,53 ---- /** * An operation upon a {@code long} input value. The operation may modify * external state. * * <p/>This is the primitive type specialization of {@link Block} for ! * {@code long} and also may be used as a {@code Block<Long>}. When used as ! * a {@code Block} the default {@code accept} implementation provided by this ! * interface does not accept null parameters. * * @since 1.8 */ ! public interface LongBlock extends Block<Long> { ! ! /** ! * {@inheritDoc} ! * ! * @param t {@inheritDoc}, must be non-null ! */ ! @Override ! public default void accept(Long t) { ! accept((long)t); ! } /** * Use the {@code long} input value in an operation which may modify * external state. *