@ Override public Color put ( Double position , Color color ) { if ( position == null ) { throw new NullPointerException ( "Null endpoint position" ) ; } if ( color == null ) { throw new NullPointerException ( "Null colors are not allowed." ) ; } return mapping . put ( position , color ) ; }
Adds a gradient endpoint at the specified position .