예제 #1
0
 /**
  * Gets a <code>Cause</code> from its unique ID. If no cause is associated with <code>id</code>
  * this method returns null.
  *
  * @param id of a cause
  * @return Cause with <code>id</code>
  */
 static Cause fromId(int id) {
   Cause cause = null;
   EnumSet<Cause> es = EnumSet.allOf(Cause.class);
   for (Cause c : es) {
     if (c.getId() == id) {
       cause = c;
       break;
     }
   }
   return cause;
 }
예제 #2
0
 /**
  * Retrieves a string representation of this version compatibility issue.
  *
  * @return A string representation of this version compatibility issue.
  */
 @Override
 public String toString() {
   return Integer.toString(cause.getId());
 }