public final class

MessagePattern.Part

extends java.lang.Object

 java.lang.Object

↳androidx.core.i18n.messageformat_icu.text.MessagePattern.Part

Overview

A message pattern "part", representing a pattern parsing event. There is a part for the start and end of a message or argument, for quoting and escaping of and with ASCII apostrophes, and for syntax elements of "complex" arguments. icu_annot::stable ICU 4.8

Summary

Methods
public booleanequals(java.lang.Object other)

public MessagePattern.ArgTypegetArgType()

Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise ArgType.NONE.

public intgetIndex()

Returns the pattern string index associated with this Part.

public intgetLength()

Returns the length of the pattern substring associated with this Part.

public intgetLimit()

Returns the pattern string limit (exclusive-end) index associated with this Part.

public MessagePattern.Part.TypegetType()

Returns the type of this part.

public intgetValue()

Returns a value associated with this part.

public inthashCode()

icu_annot::stable ICU 4.8

public java.lang.StringtoString()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait

Methods

public MessagePattern.Part.Type getType()

Returns the type of this part.

Returns:

the part type. icu_annot::stable ICU 4.8

public int getIndex()

Returns the pattern string index associated with this Part.

Returns:

this part's pattern string index. icu_annot::stable ICU 4.8

public int getLength()

Returns the length of the pattern substring associated with this Part. This is 0 for some parts.

Returns:

this part's pattern substring length. icu_annot::stable ICU 4.8

public int getLimit()

Returns the pattern string limit (exclusive-end) index associated with this Part. Convenience method for getIndex()+getLength().

Returns:

this part's pattern string limit index, same as getIndex()+getLength(). icu_annot::stable ICU 4.8

public int getValue()

Returns a value associated with this part. See the documentation of each part type for details.

Returns:

the part value. icu_annot::stable ICU 4.8

public MessagePattern.ArgType getArgType()

Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise ArgType.NONE.

Returns:

the argument type for this part. icu_annot::stable ICU 4.8

public java.lang.String toString()

Returns:

a string representation of this part. icu_annot::stable ICU 4.8

public boolean equals(java.lang.Object other)

Parameters:

other: another object to compare with.

Returns:

true if this object is equivalent to the other one. icu_annot::stable ICU 4.8

public int hashCode()

icu_annot::stable ICU 4.8