/** * Returns an array of short with all the fields that describe * this gDay type. * <p>Note:the time zone is not included. * @return an array of short with all the fields that describe * this Date type. */ public short[] getValues() { short[] result = new short[1]; result[0] = this.getMonth(); return result; } //getValues
/** * Returns an array of short with all the fields that describe this gDay type. * <p> * Note:the time zone is not included. * * @return an array of short with all the fields that describe this Date type. */ public short[] getValues() { short[] result = new short[1]; result[0] = this.getMonth(); return result; } // getValues
/** * convert this GMonth to a string * The format is defined by W3C XML Schema recommendation and ISO8601 * i.e --MM--(Z|(+|-)hh:mm) * @return a string representing this Date */ public String toString() { StringBuffer result = new StringBuffer("--"); if ((this.getMonth()/10) == 0) { result.append(0); } result.append(this.getMonth()); result.append("--"); appendTimeZoneString(result); return result.toString(); } //toString
/** * convert this GMonth to a string The format is defined by W3C XML Schema recommendation and * ISO8601 i.e --MM--(Z|(+|-)hh:mm) * * @return a string representing this Date */ public String toString() { StringBuffer result = new StringBuffer("--"); if ((this.getMonth() / 10) == 0) { result.append(0); } result.append(this.getMonth()); result.append("--"); appendTimeZoneString(result); return result.toString(); } // toString
/** * Sets the value of the field associated with this descriptor. * @param target the object in which to set the value * @param value the value of the field */ public void setValue(Object target, Object value) throws java.lang.IllegalStateException { if (! (target instanceof GMonth) ) { String err = "GMonthDescriptor#setValue: expected GMonth, received instead: " + target.getClass(); throw new IllegalStateException(err); } GMonth GMonthTarget = (GMonth) target; if (value == null) { String err = "GMonthDescriptor#setValue: null value"; throw new IllegalStateException(err); } try { GMonth temp = GMonth.parseGMonth(value.toString()) ; GMonthTarget.setMonth(temp.getMonth()); if (temp.isUTC()) { GMonthTarget.setUTC(); GMonthTarget.setZone(temp.getZoneHour(), temp.getZoneMinute()); GMonthTarget.setZoneNegative(temp.isZoneNegative()); } temp = null; } catch (java.text.ParseException ex) { String err = "GMonthDescriptor#setValue: wrong value\n"+ex.getMessage(); throw new IllegalStateException(err); } } //-- setValue
GMonthTarget.setMonth(temp.getMonth()); if (temp.isUTC()) { GMonthTarget.setUTC();