Exemple #1
0
  /** It works as a converter, from integer to Type. */
  public static Type fromInteger(int id) {
    for (Type type : Type.values()) {
      if (type.getValue() == id) {
        return type;
      }
    }

    return null;
  }
Exemple #2
0
 /**
  * Given a type, this verifies whether they match.
  *
  * @param type Type to compare with.
  * @return Boolean.
  */
 public boolean isEquals(Type type) {
   return this.getValue() == type.getValue();
 }