question: public Message ( String type , double value ) { if ( ! VALID_TYPES . contains ( type ) ) { throw new IllegalArgumentException ( type + " is not a valid message type.\n" + "Valid message types are \"FAST\", \"MEDIUM\", and \"SLOW\"." ) ; } this . type = type ; this . value = value ; }
target:  Creates a new message from the type and the value.