@ SuppressWarnings ( "unchecked" ) public static < T > Promise < T > value ( final T value ) { if ( value == null ) { if ( VOID == null ) { return new ResolvedValue < T > ( value ) ; } else { return ( Promise < T > ) VOID ; } } return new ResolvedValue < T > ( value ) ; }
Creates a new promise that is already resolved with the given value .