コード例 #1
0
 /**
  * Reads given configuration property. If not found, throws a {@link MissingParameterException}.
  *
  * @param name Name of configuration property
  */
 public static int getInt(String name) {
   if (name == Network.PAR_SIZE || name == Network.PAR_MAXSIZE)
     return config.getInt(name) / Communicator.getSize();
   else return config.getInt(name);
 }
コード例 #2
0
 /**
  * Reads given configuration property. If not found, returns the default value.
  *
  * @param name Name of configuration property
  * @param def default value
  */
 public static int getInt(String name, int def) {
   return config.getInt(name, def);
 }