/** * With this attribute. * @param name Attribute name * @param value The value * @return AttributeUpdates * @since 0.14.3 */ public AttributeUpdates with(final String name, final AttributeValue value) { return this.with( name, new AttributeValueUpdate(value, AttributeAction.PUT) ); }
/** * With this attribute. * @param name Attribute name * @param value The value * @return AttributeUpdates * @since 0.14.3 */ public AttributeUpdates with(final String name, final AttributeValue value) { return this.with( name, new AttributeValueUpdate(value, AttributeAction.PUT) ); }
@Override public Map<String, AttributeValue> put(final String attr, final AttributeValueUpdate value) throws IOException { return this.put(new AttributeUpdates().with(attr, value)); }
@Override public Map<String, AttributeValue> put(final String attr, final AttributeValueUpdate value) throws IOException { return this.put(new AttributeUpdates().with(attr, value)); }
/** * With this attribute. * @param name Attribute name * @param value The value * @return AttributeUpdates * @since 0.14.3 */ public AttributeUpdates with(final String name, final Object value) { final AttributeValue attr; if (value instanceof Long || value instanceof Integer) { attr = new AttributeValue().withN(value.toString()); } else { attr = new AttributeValue(value.toString()); } return this.with(name, attr); }
/** * With this attribute. * @param name Attribute name * @param value The value * @return AttributeUpdates * @since 0.14.3 */ public AttributeUpdates with(final String name, final Object value) { final AttributeValue attr; if (value instanceof Long || value instanceof Integer) { attr = new AttributeValue().withN(value.toString()); } else { attr = new AttributeValue(value.toString()); } return this.with(name, attr); }
before.put( new AttributeUpdates() .with( "pos", new AttributeValueUpdate() .with("psum", new DyNum(diff).update(AttributeAction.ADD)) ); } else { before.put( new AttributeUpdates() .with( "neg", new AttributeValueUpdate() .with("nsum", new DyNum(-diff).update(AttributeAction.ADD)) ); after.put( new AttributeUpdates() .with( "navg", new DyNum( .with( "pavg", new DyNum( final double neg = (double) Long.parseLong(fin.get("neg").getN());