com.phloc.json.impl.ECloneStategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phloc-json Show documentation
Show all versions of phloc-json Show documentation
Library for read and writing JSON objects in a typesafe manner
package com.phloc.json.impl;
import javax.annotation.Nullable;
public enum ECloneStategy
{
FORCE ("force"),
AVOID ("avoid"),
INHERIT ("inherit"); //$NON-NLS-1$
private String m_sID;
private ECloneStategy (final String sID)
{
this.m_sID = sID;
}
public String getID ()
{
return this.m_sID;
}
/**
* Tries to resolve the enum entry corresponding to the passed ID
*
* @param sID
* @return The resolved enum entry, or null
*/
@Nullable
public static ECloneStategy getFromID (final String sID)
{
for (final ECloneStategy eValue : values ())
{
if (eValue.getID ().equals (sID))
{
return eValue;
}
}
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy