List of usage examples for java.lang Integer intValue
@HotSpotIntrinsicCandidate public int intValue()
From source file:com.tesora.dve.sql.statement.dml.AliasInformation.java
public void removeAlias(String s) { Integer any = aliases.get(s); if (any == null) return;//from ww w . j a v a 2 s . c om if (any.intValue() < 2) { aliases.remove(s); } else { aliases.put(s, new Integer(any.intValue() - 1)); } }
From source file:com.aurel.track.fieldType.runtime.matchers.converter.StringMatcherConverter.java
/** * Convert the object value to xml string for save * @param value//from w ww .ja v a 2s . c om * @param matcherRelation * @return */ @Override public String toXMLString(Object value, Integer matcherRelation) { if (value != null && matcherRelation != null) { switch (matcherRelation.intValue()) { case MatchRelations.EQUAL: case MatchRelations.NOT_EQUAL: case MatchRelations.EQUAL_IGNORE_CASE: case MatchRelations.PERL_PATTERN: case MatchRelations.LIKE: case MatchRelations.NOT_LIKE: return StringEscapeUtils.escapeXml(value.toString()); } } return null; }
From source file:nl.surfnet.coin.teams.service.impl.AbstractGrouperDaoImpl.java
protected Integer correctPageSize(Integer pageSize) { if (pageSize == null || pageSize.intValue() == 0) { pageSize = Integer.MAX_VALUE; }/*from ww w . ja va2 s . co m*/ return pageSize; }
From source file:com.prowidesoftware.swift.model.SwiftBlock4.java
/** * Sets the block number. Will cause an exception unless setting block number to 4. * @param blockNumber the block number to set * @throws IllegalArgumentException if parameter blockName is not the integer 4 * @since 5.0/*from www .j av a2s .c o m*/ */ protected void setBlockNumber(Integer blockNumber) { // sanity check Validate.notNull(blockNumber, "parameter 'blockNumber' cannot be null"); Validate.isTrue(blockNumber.intValue() == 4, "blockNumber must be 4"); }
From source file:module.siadap.domain.SiadapAutoEvaluation.java
/** * //w ww. j a v a 2 s . c om * @param factorClassification * the classification of the factor to assert if it is extreme or * not * @return true if it is classificated as an extreme, false otherwise */ private boolean isExtremeClassification(Integer factorClassification) { if (factorClassification == null) { return false; } if (factorClassification.intValue() <= 2 || factorClassification.intValue() >= 5) { return true; } return false; }
From source file:com.dattack.jtoolbox.commons.email.HtmlEmailBuilder.java
public HtmlEmailBuilder withPort(final Integer value) { if (value != null) { this.port = value.intValue(); }// w w w. ja v a 2 s. c om return this; }
From source file:de.hybris.platform.acceleratorservices.config.impl.AbstractConfigLookup.java
@Override public int getInt(final String key, final int defaultValue) { final String property = getProperty(key); if (property != null && !property.isEmpty()) { try {//w w w . j av a2 s . c o m final Integer integerValue = Integer.valueOf(property); if (integerValue != null) { return integerValue.intValue(); } } catch (final NumberFormatException ex) { if (LOG.isDebugEnabled()) { LOG.debug( "Failed to parse int property value for key [" + key + "] value was [" + property + "]", ex); } } } return defaultValue; }
From source file:edu.wpi.cs.wpisuitetng.modules.requirementsmanager.view.charts.IterationRequirementStatistics.java
/** * {@inheritDoc}/*from w w w. j a va 2 s.c om*/ */ @Override public void update() { final List<Requirement> requirements = RequirementDatabase.getInstance().getFilteredRequirements(); // refresh list of // requirements Map<String, Integer> mapData = new HashMap<String, Integer>(); // for every possible status for (final Iteration iteration : IterationDatabase.getInstance().getAll()) { mapData.put(iteration.getName(), new Integer(0)); // set the // number of // counted // requirements // with that // status to // zero } // for every requirement in this project for (final Requirement requirement : requirements) { try { final Iteration iteration = IterationDatabase.getInstance().get(requirement.getIteration()); final Integer oldValue = mapData.get(iteration.getName()); mapData.put(iteration.getName(), new Integer(oldValue.intValue() + 1)); // increment the // number of // requirements // for a given // iteration } catch (final IterationNotFoundException e) { System.out.println("Iteration wasn't found, disregarding: IterationRequirementStatistics:54"); } } //parse into a list for (String key : mapData.keySet()) { data.add(new StringIntegerPair(key, mapData.get(key))); } }
From source file:ArrayMap.java
@Override public Object put(String key, Object value) { Integer i = index(key); if (i != null) { Object ret = data[i.intValue()]; data[i.intValue()] = value;/*from w w w. j av a 2s . c o m*/ return ret; } else { throw new RuntimeException("invalid key: " + key); } }
From source file:FibonacciTest.java
public int calculateWithCache(int x) { Integer key = new Integer(x); Integer result = values.get(key); if (result == null) { result = new Integer(calculate(x)); values.putIfAbsent(key, result); }/*from w w w. j a va 2 s . com*/ return result.intValue(); }