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

com.minlessika.membership.integration.Sex Maven / Gradle / Ivy

Go to download

It's a library to help developers to integration membership services to another project.

There is a newer version: 0.3.1
Show newest version
package com.minlessika.membership.integration;

public enum Sex {
	
	NONE(0, "Non défini"),
	M(1, "Masculin"), 
	F(2, "Féminin");
	
	private final int id;
	private final String name;
	
	Sex(final int id, final String name){
		this.id = id;
		this.name = name;
	}
	
	public static Sex get(int id){
		
		Sex value = Sex.NONE;
		for (Sex item : Sex.values()) {
			if(item.id() == id)
				value = item;
		}
		
		return value;
	}
	
	public int id(){
		return id;
	}
	
	public String toString(){
		return name;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy