コード例 #1
0
ファイル: ELogLevel.java プロジェクト: keplersj/BlazeLoader
 /**
  * Gets the ELogLevel identified by the given name.
  *
  * @param name The name of the ELogLevel to get.
  * @return Return the ELogLevel identified by the given name, or null if none exists.
  */
 public static ELogLevel getByName(String name) {
   if (name == null) {
     throw new IllegalArgumentException("name cannot be null!");
   } else {
     for (ELogLevel level : values()) {
       if (name.equals(level.getLevelName())) {
         return level;
       }
     }
     return null;
   }
 }
コード例 #2
0
ファイル: ELogLevel.java プロジェクト: keplersj/BlazeLoader
 /**
  * Returns true if this ELogLevel is allowed with the specified priority.
  *
  * @param priority The priority to compare to.
  * @return Returns true if this ELogLevel is allowed with the specified priority.
  */
 public boolean isAllowed(ELogLevel priority) {
   return this.priority >= priority.getPriority();
 }