but when i create object saying CustomAlert("error",AlertType.ERROR) none of the statements are executed.
Can anyone tell how to check the type of alert. if AlertType.SOMETHING was an int i could have checked it , but AlertType.SOMETHING is of type AlertType itself . i can't use .equals also because its doing only '==' . I don't want to go for , say
CustomAlert("message",1); or CustomAlert("message","error");