List of usage examples for java.lang Number intValue
public abstract int intValue();
From source file:com.prowidesoftware.swift.model.field.Field38D.java
/** * Set the component1 from a Number object. * <br />/*from ww w .j a v a2 s . c o m*/ * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field38D setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, "" + component1.intValue()); } return this; }
From source file:com.prowidesoftware.swift.model.field.Field401.java
/** * Set the component1 from a Number object. * <br />/*from w w w. j a v a 2 s. com*/ * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field401 setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, "" + component1.intValue()); } return this; }
From source file:com.prowidesoftware.swift.model.field.Field431.java
/** * Set the component1 from a Number object. * <br />/* w ww . j a v a 2 s.c om*/ * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field431 setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, "" + component1.intValue()); } return this; }
From source file:com.prowidesoftware.swift.model.field.Field26J.java
/** * Set the component1 from a Number object. * <br />//from w ww . ja v a 2s . c o m * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field26J setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, "" + component1.intValue()); } return this; }
From source file:com.prowidesoftware.swift.model.field.Field26L.java
/** * Set the component1 from a Number object. * <br />// w w w.jav a 2s. co m * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field26L setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, "" + component1.intValue()); } return this; }
From source file:com.quinsoft.zeidon.domains.IntegerDomain.java
@Override public Object convertExternalValue(Task task, AttributeInstance attributeInstance, AttributeDef attributeDef, String contextName, Object externalValue) { // If external value is an AttributeInstance then get *its* internal value. if (externalValue instanceof AttributeInstance) externalValue = ((AttributeInstance) externalValue).getValue(); if (externalValue == null) return null; if (externalValue instanceof Long) return check(attributeDef, Ints.checkedCast((Long) externalValue)); if (externalValue instanceof Number) return check(attributeDef, ((Number) externalValue).intValue()); if (externalValue instanceof CharSequence) { // VML uses "" as a synonym for null. if (externalValue instanceof String && StringUtils.isBlank((String) externalValue)) return null; if (!StringUtils.isBlank(contextName)) { NumericContext context = (NumericContext) getContext(contextName); if (context.hasFormatter()) { Number number = (Number) context.convertExternalValue(task, attributeDef, externalValue); return check(attributeDef, number.intValue()); }/*from ww w .j ava 2 s.c o m*/ } Integer num; try { num = Integer.parseInt(externalValue.toString().trim()); } catch (Exception e) { throw new InvalidAttributeValueException(attributeDef, externalValue, "Can't convert '%s' (class: %s) to Integer", externalValue, externalValue.getClass().getName()); } return check(attributeDef, num); } throw new InvalidAttributeValueException(attributeDef, externalValue, "Can't convert '%s' (class: %s) to Integer", externalValue, externalValue.getClass().getName()); }
From source file:com.prowidesoftware.swift.model.field.Field111.java
/** * Set the component1 from a Number object. * <br />//from w w w . j av a 2 s . co m * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field111 setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, Integer.toString(component1.intValue())); } return this; }
From source file:com.prowidesoftware.swift.model.field.Field129.java
/** * Set the component1 from a Number object. * <br />/* w w w . ja va 2s .com*/ * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field129 setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, "" + component1.intValue()); } return this; }
From source file:com.prowidesoftware.swift.model.field.Field129.java
/** * Set the component2 from a Number object. * <br />/*from ww w. j a v a 2 s . c om*/ * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent2(String) * method. * * @see #setComponent2(String) * * @param component2 the Number with the component2 content to set */ public Field129 setComponent2(java.lang.Number component2) { if (component2 != null) { setComponent(2, "" + component2.intValue()); } return this; }
From source file:com.prowidesoftware.swift.model.field.Field27.java
/** * Set the component1 from a Number object. * <br />//from ww w .ja v a2 s .c o m * <em>If the component being set is a fixed length number, the argument will not be * padded.</em> It is recommended for these cases to use the setComponent1(String) * method. * * @see #setComponent1(String) * * @param component1 the Number with the component1 content to set */ public Field27 setComponent1(java.lang.Number component1) { if (component1 != null) { setComponent(1, "" + component1.intValue()); } return this; }