Asserts the integer is either null or positive, reporting to {@link ProblemReporter} with this context if it is.

@param integer      Value to assert on.
@param propertyName Name of property.
542665
public void assertIsPositiveIfPresent(Integer integer, String propertyName) {
        if (integer != null && integer <= 0) {
            problemReporter.report(new Problem(this, String.format("%s must be positive", propertyName)));
        }
    }
285693
public static void notNegative(Integer value) {
		if(!validation) return;
		Validate.notNull(value);
		if(value < 0)
			throw new ParameterException(ErrorCode.NEGATIVE);
	}
487767
public PropertyBuilder integer(final String name) {
        name(name);
        type(Property.Type.Integer);
        return this;
    }
581626
static public function integer($value, $message = null, $propertyPath = null)
        {
            if ( ! is_int($value)) {
                $message = $message ?: sprintf(
                    'Value "%s" is not an integer.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_INTEGER, $propertyPath);
            }
        }
283181
@Override
    protected int findPropertyId(String propName)
    {
        Integer I = sProperties.get(propName);
        return (I == null) ? -1 : I.intValue();
    }
514780
private static boolean isInteger( Number n ) {
      if( n instanceof Integer ){
         return true;
      }
      try{
         Integer.parseInt( String.valueOf( n ) );
         return true;
      }catch( NumberFormatException e ){
         return false;
      }
   }
689818
public void assertStringNotEmpty(String propertyValue, String propertyName) {
        if (StringUtils.isNullOrEmpty(propertyValue)) {
            problemReporter.report(new Problem(this, String.format("%s is a required property.", propertyName)));
        }
    }
246127
public void assertNotEmpty(Map<?, ?> map, String propertyName) {
        if (map == null || map.size() == 0) {
            problemReporter.report(new Problem(this, String.format("%s requires one or more entries", propertyName)));
        }
    }
607770
public void assertOneOrLess(final String propertyName,
            final PropertyList properties) throws ValidationException {

        if (properties.getProperties(propertyName).size() > 1) {
            throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {propertyName});
        }
    }
190442
public static function assert($value, $varName) {
        return !is_int($value) && $value !== null ? Exceptions::InvalidTypeException('MaybeInt', $varName, $value) : $value;
    }
341795
public static Integer getInteger(String propertyName, String envName, Integer defaultValue) {
		checkEnvName(envName);
		Integer propertyValue = NumberUtil.toIntObject(System.getProperty(propertyName), null);
		if (propertyValue != null) {
			return propertyValue;
		} else {
			propertyValue = NumberUtil.toIntObject(System.getenv(envName), null);
			return propertyValue != null ? propertyValue : defaultValue;
		}
	}
585514
public static void isPositive(Integer value, String name) {
    notNull(value, name);

    if (value < 0) {
      throw new IllegalArgumentException(name + "must be a positive number.");
    }
  }
425323
public void assertOne(final String propertyName,
            final PropertyList properties) throws ValidationException {

        if (properties.getProperties(propertyName).size() != 1) {
            throw new ValidationException(ASSERT_ONE_MESSAGE, new Object[] {propertyName});
        }
    }
690449
public int getInteger(String property) {
    return getProperty(property, value -> {
      try {
        return Integer.valueOf(value);
      } catch (NumberFormatException e) {
        throw new ConfigurationException("malformed property value: " + property + " must be an integer");
      }
    });
  }
978774
public void setProperty(final String propertyName, final String value) {
        Preconditions.checkNotNull(propertyName);
        if (value == null) {
            properties.put(propertyName, null);
            return;
        }
        List<String> values = new ArrayList<>();
        values.add(value);
        properties.put(propertyName, values);
    }
1346493
private void writeInteger(int value)
		throws IOException
	{
		if(value < 0)
		{
			out.write(TAG_NEGATIVE_INT);
			writeIntegerNoTag(-value);
		}
		else
		{
			out.write(TAG_POSITIVE_INT);
			writeIntegerNoTag(value);
		}
	}
1374307
public static Integer getIntegerValue(QuerySolution resultRow, String variableName) {

        if (resultRow != null) {
            Resource res = resultRow.getResource(variableName);
            if (res != null && res.isLiteral()) {
                Literal val = res.asLiteral();
                if (val != null) {
                    return Integer.valueOf(val.getInt());
                }
            }
        }

        return null;
    }