# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# DateIntervalFormat.FormattedDateInterval

`public static final class DateIntervalFormat.FormattedDateInterval`
`extends Object` `implements FormattedValue`

java.lang.Object
↳ | android.icu.text.DateIntervalFormat.FormattedDateInterval

An immutable class containing the result of a date interval formatting operation. Instances of this class are immutable and thread-safe. Not intended for public subclassing.

## Summary

### Public methods
`<A extends Appendable> A` | `appendTo(A appendable)` Appends the formatted string to an Appendable.
`char` | `charAt(int index)` Returns the `char` value at the specified index.
`int` | `length()` Returns the length of this character sequence.
`boolean` | `nextPosition(ConstrainedFieldPosition cfpos)` Iterates over field positions in the FormattedValue.
`CharSequence` | `subSequence(int start, int end)` Returns a `CharSequence` that is a subsequence of this sequence.
`AttributedCharacterIterator` | `toCharacterIterator()` Exports the formatted number as an AttributedCharacterIterator.
`String` | `toString()` Returns a string representation of the object.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `android.icu.text.FormattedValue`
`abstract <A extends Appendable> A` | `appendTo(A appendable)` Appends the formatted string to an Appendable.
`abstract boolean` | `nextPosition(ConstrainedFieldPosition cfpos)` Iterates over field positions in the FormattedValue.
`abstract AttributedCharacterIterator` | `toCharacterIterator()` Exports the formatted number as an AttributedCharacterIterator.
`abstract String` | `toString()` Returns the formatted string as a Java String.
From interface `java.lang.CharSequence`
`abstract char` | `charAt(int index)` Returns the `char` value at the specified index.
`default IntStream` | `chars()` Returns a stream of `int` zero-extending the `char` values from this sequence.
`default IntStream` | `codePoints()` Returns a stream of code point values from this sequence.
`abstract int` | `length()` Returns the length of this character sequence.
`abstract CharSequence` | `subSequence(int start, int end)` Returns a `CharSequence` that is a subsequence of this sequence.
`abstract String` | `toString()` Returns a string containing the characters in this sequence in the same order as this sequence.

## Public methods

### appendTo

    public A appendTo (A appendable)

Appends the formatted string to an Appendable.

If an IOException occurs when appending to the Appendable, an unchecked `ICUUncheckedIOException` is thrown instead.

Parameters
`appendable` | `A`: The Appendable to which to append the string output.

Returns
`A` | The same Appendable, for chaining.

### charAt

    public char charAt (int index)

Returns the `char` value at the specified index. An index ranges from zero to `length() - 1`. The first `char` value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the `char` value specified by the index is a surrogate, the surrogate value is returned.

Parameters
`index` | `int`: the index of the `char` value to be returned

Returns
`char` | the specified `char` value

### length

    public int length ()

Returns the length of this character sequence. The length is the number of 16-bit `char`s in the sequence.

Returns
`int` | the number of `char`s in this sequence

### nextPosition

    public boolean nextPosition (ConstrainedFieldPosition cfpos)

Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator. To loop over all field positions:

         ConstrainableFieldPosition cfpos = new ConstrainableFieldPosition();
         while (fmtval.nextPosition(cfpos)) {
             // handle the field position; get information from cfpos
         }

Parameters
`cfpos` | `ConstrainedFieldPosition`: The object used for iteration state. This can provide constraints to iterate over only one specific field; see `ConstrainedFieldPosition#constrainField`.

Returns
`boolean` | true if a new occurrence of the field was found; false otherwise.

### subSequence

    public CharSequence subSequence (int start,
                    int end)

Returns a `CharSequence` that is a subsequence of this sequence. The subsequence starts with the `char` value at the specified index and ends with the `char` value at index `end - 1`. The length (in `char`s) of the returned sequence is `end - start`, so if `start == end` then an empty sequence is returned.

Parameters
`start` | `int`: the start index, inclusive
`end` | `int`: the end index, exclusive

Returns
`CharSequence` | the specified subsequence

### toCharacterIterator

    public AttributedCharacterIterator toCharacterIterator ()

Exports the formatted number as an AttributedCharacterIterator.

Consider using `nextPosition(ConstrainedFieldPosition)` if you are trying to get field information.

Returns
`AttributedCharacterIterator` | An AttributedCharacterIterator containing full field information.

### toString

    public String toString ()

Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

>      getClass().getName() + '@' + Integer.toHexString(hashCode())

Returns
`String` | a string representation of the object.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*