Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.askfast.model;
 
 
 public enum TTSProvider {
 
     ACAPELA, VOICE_RSS;

    
returns the enum based on the name or the value

Parameters:
value
Returns:
    @JsonCreator
    public static TTSProvider getByValue(String value) {
        for (TTSProvider provider : values()) {
            if (provider.name().equalsIgnoreCase(value)) {
                return provider;
            }
        }
        return null;
    }
New to GrepCode? Check out our FAQ X