ICU 78.1 78.1

Public Member Functions | Friends
icu::FieldPositionIterator Class Reference

FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Format::format. More...

`#include <fpositer.h>`

Inheritance diagram for icu::FieldPositionIterator:

## Public Member Functions
| ~FieldPositionIterator ()
| Destructor. More...
| FieldPositionIterator ()
| Constructs a new, empty iterator. More...
| FieldPositionIterator (const FieldPositionIterator &)
| Copy constructor. More...
bool | operator== (const FieldPositionIterator &) const
| Return true if another object is semantically equal to this one. More...
bool | operator!= (const FieldPositionIterator &rhs) const
| Returns the complement of the result of operator==. More...
UBool | next (FieldPosition &fp)
| If the current position is valid, updates the FieldPosition values, advances the iterator, and returns true, otherwise returns false. More...
Public Member Functions inherited from icu::UObject
virtual | ~UObject ()
| Destructor. More...
virtual UClassID | getDynamicClassID () const
| ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class. More...

## Friends
class | FieldPositionIteratorHandler

## Detailed Description

FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Format::format.

See Format, NumberFormat, DecimalFormat.

Stable:
  ICU 4.4

Definition at line 58 of file fpositer.h.

## Constructor & Destructor Documentation

## ◆ ~FieldPositionIterator()

icu::FieldPositionIterator::~FieldPositionIterator | ( |  | ) |

Destructor.

Stable:
  ICU 4.4

## ◆ FieldPositionIterator() [1/2]

icu::FieldPositionIterator::FieldPositionIterator | ( |  | ) |

Constructs a new, empty iterator.

Stable:
  ICU 4.4

## ◆ FieldPositionIterator() [2/2]

icu::FieldPositionIterator::FieldPositionIterator | ( | const FieldPositionIterator & |  | ) |

Copy constructor.

If the copy failed for some reason, the new iterator will be empty.

Stable:
  ICU 4.4

## Member Function Documentation

## ◆ next()

UBool icu::FieldPositionIterator::next | ( | FieldPosition & | fp | ) |

If the current position is valid, updates the FieldPosition values, advances the iterator, and returns true, otherwise returns false.

Stable:
  ICU 4.4

## ◆ operator!=()

bool icu::FieldPositionIterator::operator!= | ( | const FieldPositionIterator & | rhs | ) | const
| inline

Returns the complement of the result of operator==.

Parameters

  rhs | The FieldPositionIterator to be compared for inequality

Returns
  the complement of the result of operator==

Stable:
  ICU 4.4

Definition at line 95 of file fpositer.h.

References icu::operator==().

## ◆ operator==()

bool icu::FieldPositionIterator::operator== | ( | const FieldPositionIterator & |  | ) | const

Return true if another object is semantically equal to this one.

Return true if this FieldPositionIterator is at the same position in an equal array of run values.

Stable:
  ICU 4.4

The documentation for this class was generated from the following file:

- i18n/unicode/fpositer.h