/** * Sets the value from any Number instance. * * @param value the value to set, not null * @throws NullPointerException if the object is null * @throws ClassCastException if the type is not a {@link Number} */ public void setValue(Object value) { setValue(((Number) value).intValue()); }
successCountWrapper.setValue(successCount);
parsePos.setValue(jsonReader.getCurrentLineOffset() - 1);
/** * Sets the value from any Number instance. * * @param value the value to set, not null * @throws NullPointerException if the object is null * @throws ClassCastException if the type is not a {@link Number} */ public void setValue(Object value) { setValue(((Number) value).intValue()); }
/** * Sets the value from any Number instance. * * @param value the value to set, not null * @throws NullPointerException if the object is null * @throws ClassCastException if the type is not a {@link Number} */ public void setValue(Object value) { setValue(((Number) value).intValue()); }
/** * Sets the value from any Number instance. * * @param value the value to set, not null * @throws NullPointerException if the object is null * @throws ClassCastException if the type is not a {@link Number} */ public void setValue(Object value) { setValue(((Number) value).intValue()); }
/** * Sets the value from any Number instance. * * @param value the value to set, not null * @throws NullPointerException if the object is null * @throws ClassCastException if the type is not a {@link Number} */ public void setValue(Object value) { setValue(((Number) value).intValue()); }
/** * Sets the value from any Number instance. * * @param value the value to set, not null * @throws NullPointerException if the object is null * @throws ClassCastException if the type is not a {@link Number} */ public void setValue(Object value) { setValue(((Number) value).intValue()); }
public void clear() { sum.setValue(0); count.setValue(0); } }
Map map = new HashMap (); MutableInt newValue = new MutableInt (0); // default MutableInt oldValue = map.put (key, newValue); if (oldValue != null) { newValue.setValue(oldValue + 1); // old + inc }
void KillOver21(MutableInt m) { if(m.getValue() > 21) { m.setValue(0); } }
Map map = new HashMap (); final int defaut = 0; final int inc = 1; MutableInt oldValue = new MutableInt (default); while(true) { MutableInt newValue = oldValue; oldValue = map.put (key, newValue); // insert or... if (oldValue != null) { newValue.setValue(oldValue + inc); // ...update oldValue.setValue(default); // reuse } else oldValue = new MutableInt (default); // renew } }
public void handle(MessageContext synCtx) { onFailInvoked.setValue(1); } });
MutableInt s = new MutableInt(0); MutableInt j = s; s.setValue(5); System.out.println(s.intValue()); // 5 System.out.println(j.intValue()); // 5
public boolean handleAuditEntry( Long entryId, String applicationName, String user, long time, Map<String, Serializable> values) { count.setValue(count.intValue() + 1); timestamps.add(time); return true; }
public Long execute() throws Throwable { callCount.setValue(callCount.intValue() + 1); throw new ConcurrentModificationException(); } };
public boolean handleAuditEntry( Long entryId, String applicationName, String user, long time, Map<String, Serializable> values) { count.setValue(count.intValue() + 1); timestamps.add(time); entryIds.add(entryId); return true; }
@Override public boolean handleAuditEntry(Long entryId, String applicationName, String user, long time, Map<String, Serializable> values) { assertNotNull(applicationName); assertNotNull(user); sb.append("Row: ").append(entryId).append(" | ") .append(applicationName).append(" | ") .append(user).append(" | ") .append(new Date(time)).append(" | ") .append(values).append(" | ").append("\n"); rowCount.setValue(rowCount.intValue() + 1); return true; }
@Override public boolean handleAuditEntry(Long entryId, String applicationName, String user, long time, Map<String, Serializable> values) { assertNotNull(applicationName); assertNotNull(user); sb.append("Row: ").append(entryId).append(" | ") .append(applicationName).append(" | ") .append(user).append(" | ") .append(new Date(time)).append(" | ") .append(values).append(" | ").append("\n"); rowCount.setValue(rowCount.intValue() + 1); return true; }
public Long execute() throws Throwable { callCount.setValue(callCount.intValue() + 1); throw new InvalidNodeRefException(new NodeRef("test", "test", "test")); } };