Compare on {@link java.util.logging.Level#intValue()}
544594
public static Comparator<Level> comparator() {
        return new Comparator<Level>() {
            @Override
            public int compare(Level l1, Level l2) {
                return Integer.compare(l1.intValue(), l2.intValue());
            }
        };
    }
1183962
def __int(value):
    ''''''
    valid, _value = False, value
    try:
        _value = int(value)
        valid = True
    except ValueError:
        pass
    return (valid, _value, 'integer')
397641
@Override
    protected void logImpl(LogLevel level,Object[] message,Throwable throwable)
    {
        //get log level
        int levelValue=level.getValue();
        Level jdkLevel=null;
        switch(levelValue)
        {
            case LogLevel.DEBUG_LOG_LEVEL_VALUE:
                jdkLevel=Level.FINEST;
                break;
            case LogLevel.ERROR_LOG_LEVEL_VALUE:
                jdkLevel=Level.SEVERE;
                break;
            case LogLevel.INFO_LOG_LEVEL_VALUE:
            default:
                jdkLevel=Level.FINE;
                break;
        }

        if(jdkLevel!=null)
        {
            //format log message (without exception)
            String text=this.formatLogMessage(level,message,null);

            //log
            this.JDK_LOGGER.log(jdkLevel,text,throwable);
        }
    }
208046
@Override
  public int compareTo(IntIntPair other) {
    int fdiff = this.first - other.first;
    if(fdiff != 0) {
      return fdiff;
    }
    return this.second - other.second;
  }
121588
@Override
	public Void visitInt(int i, String p) {
		//System.out.printf(">> %s intValue: %d\n", p, i);

		if (inTasks && AnnotationAttributeType.VERSION.getValue().equals(p)) {
			// add value
			currentValue = (currentValue == null) ? new Pair<Integer, String>() : currentValue;			
			currentValue.value0=i;
			
			if (currentValue.value0!=null && StringUtils.hasText(currentValue.value1)) {
				tasks.add(currentValue);
				currentValue=null;
			}
		}

		return null;
	}
778633
def log_level(self,
              level: typing.Union[str, int]=None,
              *args,
              **kwargs) -> typing.Union[None, str]:
    
    if level is None:
        return self.root_logger.getEffectiveLevel()
    # NOTE: `setLevel` takes both string and integers. Try to cast to an integer first
    try:
        value = int(level)
    # if we can't cast to an int, it's probably a string
    except ValueError:
        pass

    self.root_logger.setLevel(value)
1022418
public int getInt(int key)
    {
        Object value = map.get(key);
        if (!(value instanceof Integer))
        {
            return 0;
        }
        Integer result = (Integer)value;
        return result;
    }
617829
@Override
    public int getInt(int index) {
        check(index);
        final FLValue flValue = values.get(index);
        return flValue != null ? (int) flValue.asInt() : 0;
    }
170407
public static Integer readInteger(String value, Integer defaultValue) {
		if (!StringUtils.hasText(value)) return defaultValue;
		
		return Integer.valueOf(value);
	}
927948
@Override
	public int compareTo(ShortValue o) {
		final int other = o.value;
		return this.value < other ? -1 : this.value > other ? 1 : 0;
	}
1082904
private int convertToInt(Object o, int defaultValue) {
		if (o.getClass() == Integer.class) {
			return (Integer) o;
		}
		else if (o.getClass() == Long.class) {
			long value = (Long) o;
			if (value <= Integer.MAX_VALUE && value >= Integer.MIN_VALUE) {
				return (int) value;
			} else {
				LOG.warn("Configuration value {} overflows/underflows the integer type.", value);
				return defaultValue;
			}
		}
		else {
			try {
				return Integer.parseInt(o.toString());
			}
			catch (NumberFormatException e) {
				LOG.warn("Configuration cannot evaluate value {} as an integer number", o);
				return defaultValue;
			}
		}
	}
67518
public int getPropAsInt(String key, int def) {
    return Integer.parseInt(getProp(key, String.valueOf(def)));
  }
5205
@Override
    public Double getValue() {
        Double rslt = getUiValue();
        if (rslt == null) return internVal;

        if (internVal == null) {
            Double min = getMin();
            if (rslt == min || rslt != null && rslt.equals(min)) return null;
        }
        internVal = rslt;
        return rslt;
    }
289030
@Override
	public int compareTo(ValueArray<IntValue> o) {
		IntValueArray other = (IntValueArray) o;

		int min = Math.min(position, other.position);
		for (int i = 0; i < min; i++) {
			int cmp = Integer.compare(data[i], other.data[i]);

			if (cmp != 0) {
				return cmp;
			}
		}

		return Integer.compare(position, other.position);
	}
754708
@Override
    public int getInt(int columnIndex) throws SQLException {
        checkColumnBounds(columnIndex);
        try {
            Long longValue = getPrivateInteger(columnIndex);
            if (longValue > Integer.MAX_VALUE || longValue < Integer.MIN_VALUE) {
                throw new SQLException("Value out of int range");
            }
            return longValue.intValue();
        } catch (Exception x) {
            throw SQLError.get(x);
        }
    }
358531
private static LogPriorType intToType(int intPrior) {
    LogPriorType[] values = LogPriorType.values();
    for (LogPriorType val : values) {
      if (val.ordinal() == intPrior) {
        return val;
      }
    }
    throw new IllegalArgumentException(intPrior + " is not a legal LogPrior.");
  }
829362
public static Integer checkNull(Integer value, int elseValue) {
        return checkNull(value, Integer.valueOf(elseValue));
    }