/**
 * Copyright (C) 2014-2016 Philip Helger (www.helger.com)
 * philip[at]helger[dot]com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.helger.photon.uicore.html.formlabel;

/**
 * Represents the possible label states.
 *
 * @author Philip Helger
 */
public enum ELabelType
{
  OPTIONAL,
  MANDATORY,
  ALTERNATIVE;

  public static final ELabelType DEFAULT = OPTIONAL;

  public boolean isOptional ()
  {
    return this == ELabelType.OPTIONAL;
  }

  public boolean isMandatory ()
  {
    return this == ELabelType.MANDATORY;
  }

  public boolean isAlternative ()
  {
    return this == ELabelType.ALTERNATIVE;
  }
}

@@ -703,203 +703,660 @@
 l;%0A%0A
-/**%0A * Represents the possible label states.%0A *%0A * @author Philip Helger%0A */%0Apublic enum ELabelType%0A%7B%0A  OPTIONAL,%0A  MANDATORY,%0A  ALTERNATIVE;%0A%0A  public static final ELabelType DEFAULT = OPTIONAL;
+import javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0A%0Aimport com.helger.commons.annotation.Nonempty;%0Aimport com.helger.commons.id.IHasID;%0Aimport com.helger.commons.lang.EnumHelper;%0A%0A/**%0A * Represents the possible label states.%0A *%0A * @author Philip Helger%0A */%0Apublic enum ELabelType implements IHasID %3CString%3E%0A%7B%0A  OPTIONAL (%22optional%22),%0A  MANDATORY (%22mandatory%22),%0A  ALTERNATIVE (%22alternative%22);%0A%0A  public static final ELabelType DEFAULT = OPTIONAL;%0A%0A  private final String m_sID;%0A%0A  private ELabelType (@Nonnull @Nonempty final String sID)%0A  %7B%0A    m_sID = sID;%0A  %7D%0A%0A  @Nonnull%0A  @Nonempty%0A  public String getID ()%0A  %7B%0A    return m_sID;%0A  %7D
 %0A%0A  
@@ -1599,11 +1599,167 @@
 IVE;%0A  %7D
+%0A%0A  @Nullable%0A  public static ELabelType getFromIDOrNull (@Nullable final String sID)%0A  %7B%0A    return EnumHelper.getFromIDOrNull (ELabelType.class, sID);%0A  %7D
 %0A%7D%0A

Implement IHasID<String>