/** * Formats the specified object using the rules of this simple date format * and returns an {@code AttributedCharacterIterator} with the formatted * date and attributes. * * @param object * the object to format. * @return an {@code AttributedCharacterIterator} with the formatted date * and attributes. * @throws NullPointerException * if the object is {@code null}. * @throws IllegalArgumentException * if the object cannot be formatted by this simple date * format. */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object object) { if (object == null) { throw new NullPointerException("object == null"); } if (object instanceof Date) { return formatToCharacterIteratorImpl((Date) object); } if (object instanceof Number) { return formatToCharacterIteratorImpl(new Date(((Number) object).longValue())); } throw new IllegalArgumentException("Bad class: " + object.getClass()); }
/** * Formats the specified object using the rules of this simple date format * and returns an {@code AttributedCharacterIterator} with the formatted * date and attributes. * * @param object * the object to format. * @return an {@code AttributedCharacterIterator} with the formatted date * and attributes. * @throws NullPointerException * if the object is {@code null}. * @throws IllegalArgumentException * if the object cannot be formatted by this simple date * format. */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object object) { if (object == null) { throw new NullPointerException("object == null"); } if (object instanceof Date) { return formatToCharacterIteratorImpl((Date) object); } if (object instanceof Number) { return formatToCharacterIteratorImpl(new Date(((Number) object).longValue())); } throw new IllegalArgumentException("Bad class: " + object.getClass()); }
/** * Formats the specified object using the rules of this simple date format * and returns an {@code AttributedCharacterIterator} with the formatted * date and attributes. * * @param object * the object to format. * @return an {@code AttributedCharacterIterator} with the formatted date * and attributes. * @throws NullPointerException * if the object is {@code null}. * @throws IllegalArgumentException * if the object cannot be formatted by this simple date * format. */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object object) { if (object == null) { throw new NullPointerException("object == null"); } if (object instanceof Date) { return formatToCharacterIteratorImpl((Date) object); } if (object instanceof Number) { return formatToCharacterIteratorImpl(new Date(((Number) object).longValue())); } throw new IllegalArgumentException("Bad class: " + object.getClass()); }
/** * Formats the specified object using the rules of this simple date format * and returns an {@code AttributedCharacterIterator} with the formatted * date and attributes. * * @param object * the object to format. * @return an {@code AttributedCharacterIterator} with the formatted date * and attributes. * @throws NullPointerException * if the object is {@code null}. * @throws IllegalArgumentException * if the object cannot be formatted by this simple date * format. */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object object) { if (object == null) { throw new NullPointerException("object == null"); } if (object instanceof Date) { return formatToCharacterIteratorImpl((Date) object); } if (object instanceof Number) { return formatToCharacterIteratorImpl(new Date(((Number) object).longValue())); } throw new IllegalArgumentException("Bad class: " + object.getClass()); }
/** * Formats the specified object using the rules of this simple date format * and returns an {@code AttributedCharacterIterator} with the formatted * date and attributes. * * @param object * the object to format. * @return an {@code AttributedCharacterIterator} with the formatted date * and attributes. * @throws NullPointerException * if the object is {@code null}. * @throws IllegalArgumentException * if the object cannot be formatted by this simple date * format. */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object object) { if (object == null) { throw new NullPointerException("object == null"); } if (object instanceof Date) { return formatToCharacterIteratorImpl((Date) object); } if (object instanceof Number) { return formatToCharacterIteratorImpl(new Date(((Number) object).longValue())); } throw new IllegalArgumentException("Bad class: " + object.getClass()); }
/** * Formats the specified object using the rules of this simple date format * and returns an {@code AttributedCharacterIterator} with the formatted * date and attributes. * * @param object * the object to format. * @return an {@code AttributedCharacterIterator} with the formatted date * and attributes. * @throws NullPointerException * if the object is {@code null}. * @throws IllegalArgumentException * if the object cannot be formatted by this simple date * format. */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object object) { if (object == null) { throw new NullPointerException("object == null"); } if (object instanceof Date) { return formatToCharacterIteratorImpl((Date) object); } if (object instanceof Number) { return formatToCharacterIteratorImpl(new Date(((Number) object).longValue())); } throw new IllegalArgumentException("Bad class: " + object.getClass()); }
/** * Formats the specified object using the rules of this simple date format * and returns an {@code AttributedCharacterIterator} with the formatted * date and attributes. * * @param object * the object to format. * @return an {@code AttributedCharacterIterator} with the formatted date * and attributes. * @throws NullPointerException * if the object is {@code null}. * @throws IllegalArgumentException * if the object cannot be formatted by this simple date * format. */ @Override public AttributedCharacterIterator formatToCharacterIterator(Object object) { if (object == null) { throw new NullPointerException("object == null"); } if (object instanceof Date) { return formatToCharacterIteratorImpl((Date) object); } if (object instanceof Number) { return formatToCharacterIteratorImpl(new Date(((Number) object).longValue())); } throw new IllegalArgumentException("Bad class: " + object.getClass()); }