net.sf.staccatocommons.defs.partial
Interface NullSafeAware<A>

Type Parameters:
A -
All Known Subinterfaces:
Function<A,B>, Function2<A,B,C>, Function3<A,B,C,D>, Predicate2<A,B>

public interface NullSafeAware<A>

A NullSafeAwares are object that may be converted to an Applicative object of type A that is NullSafe, that is, that accepts nulls in its applicative method. NullSafeAwares parameterized by type A should be of type A too.

Author:
flbulgarelli

Method Summary
 A nullSafe()
          Answers a new Applicative of type A that accepts nulls for its applicative method, that is, it will not throw any exception if any of its arguments is null.
 

Method Detail

nullSafe

@NonNull
@NullSafe
A nullSafe()
Answers a new Applicative of type A that accepts nulls for its applicative method, that is, it will not throw any exception if any of its arguments is null. The return value of the applicative method of the returned object for a null input is not specified by this interface. In particular, it may be null in such cases.

Returns:
a new null-safe Applicable of type A. Non null.


Get Staccatocommons at SourceForge.net. Fast, secure and Free Open Source software downloads