/** * @param key the desired parameter's key * @param alternate The alternate Integer * @return an Integer for the specified key or the specified * alternate if no matching parameter is found */ public Integer getInteger(String key, Integer alternate) { Integer num = getInteger(key); if (num == null) { return alternate; } return num; }
/** * Looks for deprecated parse depth and catch.exceptions properties, * as well as any 'forceThreadSafe' setting. */ protected void configure(ValueParser parser) { // look for deprecated parse.depth key Integer depth = parser.getInteger(KEY_PARSE_DEPTH); if (depth != null) { setParseDepth(depth); } // look for deprecated catch.exceptions key Boolean catchEm = parser.getBoolean(KEY_CATCH_EXCEPTIONS); if (catchEm != null) { setCatchExceptions(catchEm); } // check if they want thread-safety manually turned off this.forceThreadSafe = parser.getBoolean(KEY_FORCE_THREAD_SAFE, forceThreadSafe); // if we're request-scoped, then there's no point in forcing the issue if (Scope.REQUEST.equals(parser.getString("scope"))) { this.forceThreadSafe = false; } }
Integer truncateLength = values.getInteger(TRUNCATE_LENGTH_KEY); if (truncateLength != null) Integer cellLength = values.getInteger(CELL_LENGTH_KEY); if (cellLength != null)
Integer prt = props.getInteger(PORT_KEY); if (prt != null)