Construct a CLI int parameter from an {@link IntParamDef}.

@param def IntParamDef to construct a CLI int parameter from.
@return A CLI int parameter constructed from the IntParamDef.
331306
public static IntCliParam fromDef(IntParamDef def) {
        return new IntCliParam(def.getIdentifier(), def.getDefaultValueSupplier(), def.isNullable());
    }
895669
public int intValue() {
		int value;
		value = Integer.parseInt(this.param);
		if(this.isNeg) value = (-value);
		return value;
	}
539491
public Object getParameter(String paramid, Object def) {
        final Object v = getParameter(paramid);
        if (v == null) {
            return def;
        } else {
            return v;
        }
    }
808054
@Override
    public InitParamDef initParam(String name, Object value) {
        Node init = child.createChild("init-param");
        init.createChild("param-name").text(name);
        init.createChild("param-value").text(String.valueOf(value));
        return this;
    }
584785
@Override
   public void generate(Definition def)
   {
      generatePackageInfo(def, "main", null);

      generateRaCode(def);
      generateOutboundCode(def);
      generateInboundCode(def);

      generateTestCode(def);

      switch (def.getBuild())
      {
         case "ivy":
            generateAntIvyXml(def, def.getOutputDir());
            break;
         case "maven":
            generateMavenXml(def, def.getOutputDir());
            break;
         case "gradle":
            generateGradle(def, def.getOutputDir());
            break;
         default:
            generateAntXml(def, def.getOutputDir());
            break;
      }

      generateRaXml(def, def.getOutputDir());
      if (def.isSupportOutbound())
         generateIronjacamarXml(def, def.getOutputDir());

      if (def.isGenMbean() &&
            def.isSupportOutbound() &&
            !def.getMcfDefs().get(0).isUseCciConnection())
      {
         generateMBeanCode(def);
         generateMbeanXml(def, def.getOutputDir());
      }

      if (def.isSupportEis() &&
            def.isSupportOutbound() &&
            !def.getMcfDefs().get(0).isUseCciConnection())
      {
         generateEisCode(def);
      }
   }
73473
public String getStringProperty (final String name, final String def)
  {
    String val = m_aProps.getProperty (name, def);
    if (val == null)
      return def;
    val = val.trim ();
    return val.length () == 0 ? def : val;
  }
727025
public static String getPathOr(String var, String def) {
        String path = AcePathfinder.INSTANCE.getPath(var);
        if (path == null) {
            path = def;
        }
        return path;
    }
1256744
@Override
    public int getInt( final String    key,
                       final int       defaultValue )
    {
        return formatInt( key, getFormattedPropValue( key ), defaultValue );
    }
704050
public String getOrElse(int i, String def)
    {
        if (i >= 0 && i < values.size())
        {
            return values.get(i);
        }
        return def;
    }
1060266
public static DBID deref(DBIDRef ref) {
    return ref instanceof DBID ? (DBID) ref : importInteger(ref.internalGetIndex());
  }
1129760
public static ParameterDef Double(final double d) {
        final BigDecimal bd = new BigDecimal(String.format(Locale.US, "%f", d)).
            stripTrailingZeros();

        return Scaled(Types.DOUBLE, bd.scale());
    }
397606
public InitParamType<FilterType<T>> getOrCreateInitParam()
   {
      List<Node> nodeList = childNode.get("init-param");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new InitParamTypeImpl<FilterType<T>>(this, "init-param", childNode, nodeList.get(0));
      }
      return createInitParam();
   }
903199
public static int getInt( String key, int def ) {
        String s = prp.getProperty( key );
        if( s != null ) {
            try {
                def = Integer.parseInt( s );
            } catch( NumberFormatException nfe ) {
                if( log.level > 0 )
                    nfe.printStackTrace( log );
            }
        }
        return def;
    }
964500
public static int getIntParam(JSONObject params, String paramName) throws ApiException {
		if (!params.containsKey(paramName)) {
			throw new ApiException(ApiException.Type.MISSING_PARAMETER, paramName);
		}

		try {
			return params.getInt(paramName);
		} catch (JSONException e) {
			throw new ApiException(ApiException.Type.ILLEGAL_PARAMETER, paramName, e);
		}
	}
279190
public String expandDefinition (ColumnDefinition def)
    {
        return expandDefinition(def.type, def.nullable, def.unique, def.defaultValue);
    }
750116
public int getInt(String key, int defaultValue) {
    	String value = get(key);
    	if(value == null) return defaultValue;
    	try {
    		return Integer.parseInt(value);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException(key + " parameter should be a number");
        }
    }
693477
public static <S> TypeInformation<S> fromMethodParameter(Method method, int index) {

        LettuceAssert.notNull(method, "Method must not be null!");
        return new ClassTypeInformation(method.getDeclaringClass()).createInfo(method.getGenericParameterTypes()[index]);
    }