All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.krenfro.eztexting.ContactSource Maven / Gradle / Ivy

package com.github.krenfro.eztexting;

public enum ContactSource {    
    UNKNOWN("Unknown"),
    MANUALLY_ADDED("Manually Added"),
    UPLOAD("Upload"),
    WEB_WIDGET("Web Widget"),
    API("API"),
    KEYWORD("Keyword");
    
    private final String description;
    
    ContactSource(String description){
        this.description = description;
    }

    public String getDescription(){
        return description;
    }
    
    public static ContactSource fromDescription(String desc){
        for (ContactSource source: ContactSource.values()){
            if (source.getDescription().equalsIgnoreCase(desc)){
                return source;
            }
        }
        return UNKNOWN;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy