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

com.phloc.json.impl.ECloneStategy Maven / Gradle / Ivy

There is a newer version: 4.2.2
Show newest version
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