import typing

import android.icu.text
import android.icu.util
import java
import java.chaquopy
import java.lang
import java.math
import java.text
import java.util

class CompactNotation(Notation): ...

class CurrencyPrecision(Precision):
    def withCurrency(self, currency: android.icu.util.Currency, /) -> Precision: ...

class FormattedNumber(android.icu.text.FormattedValue):
    _appendTo__A = typing.TypeVar('_appendTo__A')  # <A>
    def appendTo(self, appendable: _appendTo__A, /) -> _appendTo__A: ...
    def charAt(self, index: int | java.jint | java.lang.Integer, /) -> str: ...
    def getNounClass(self) -> android.icu.text.DisplayOptions.NounClass: ...
    def getOutputUnit(self) -> android.icu.util.MeasureUnit: ...
    def length(self) -> int: ...
    def nextPosition(self, cfpos: android.icu.text.ConstrainedFieldPosition, /) -> bool: ...
    def subSequence(self, start: int | java.jint | java.lang.Integer, end: int | java.jint | java.lang.Integer, /) -> java.lang.CharSequence: ...
    def toBigDecimal(self) -> java.math.BigDecimal: ...
    def toCharacterIterator(self) -> java.text.AttributedCharacterIterator: ...
    def toString(self) -> str: ...

class FormattedNumberRange(android.icu.text.FormattedValue):
    _appendTo__A = typing.TypeVar('_appendTo__A')  # <A>
    def appendTo(self, appendable: _appendTo__A, /) -> _appendTo__A: ...
    def charAt(self, index: int | java.jint | java.lang.Integer, /) -> str: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getFirstBigDecimal(self) -> java.math.BigDecimal: ...
    def getIdentityResult(self) -> NumberRangeFormatter.RangeIdentityResult: ...
    def getSecondBigDecimal(self) -> java.math.BigDecimal: ...
    def hashCode(self) -> int: ...
    def length(self) -> int: ...
    def nextPosition(self, cfpos: android.icu.text.ConstrainedFieldPosition, /) -> bool: ...
    def subSequence(self, start: int | java.jint | java.lang.Integer, end: int | java.jint | java.lang.Integer, /) -> java.lang.CharSequence: ...
    def toCharacterIterator(self) -> java.text.AttributedCharacterIterator: ...
    def toString(self) -> str: ...

class FractionPrecision(Precision):
    def withMaxDigits(self, maxSignificantDigits: int | java.jint | java.lang.Integer, /) -> Precision: ...
    def withMinDigits(self, minSignificantDigits: int | java.jint | java.lang.Integer, /) -> Precision: ...
    def withSignificantDigits(self, minSignificantDigits: int | java.jint | java.lang.Integer, maxSignificantDigits: int | java.jint | java.lang.Integer, priority: NumberFormatter.RoundingPriority, /) -> Precision: ...

class IntegerWidth(java.lang.Object):
    def truncateAt(self, maxInt: int | java.jint | java.lang.Integer, /) -> IntegerWidth: ...
    @staticmethod
    def zeroFillTo(minInt: int | java.jint | java.lang.Integer, /) -> IntegerWidth: ...

class LocalizedNumberFormatter(NumberFormatterSettings[LocalizedNumberFormatter]):
    @typing.overload
    def format(self, input: float | java.jdouble | java.lang.Double, /) -> FormattedNumber: ...
    @typing.overload
    def format(self, input: int | java.jlong | java.lang.Long, /) -> FormattedNumber: ...
    @typing.overload
    def format(self, input: android.icu.util.Measure, /) -> FormattedNumber: ...
    @typing.overload
    def format(self, input: java.lang.Number, /) -> FormattedNumber: ...
    def toFormat(self) -> java.text.Format: ...
    def withoutLocale(self) -> UnlocalizedNumberFormatter: ...

class LocalizedNumberRangeFormatter(NumberRangeFormatterSettings[LocalizedNumberRangeFormatter]):
    @typing.overload
    def formatRange(self, first: float | java.jdouble | java.lang.Double, second: float | java.jdouble | java.lang.Double, /) -> FormattedNumberRange: ...
    @typing.overload
    def formatRange(self, first: int | java.jint | java.lang.Integer, second: int | java.jint | java.lang.Integer, /) -> FormattedNumberRange: ...
    @typing.overload
    def formatRange(self, first: java.lang.Number, second: java.lang.Number, /) -> FormattedNumberRange: ...
    def withoutLocale(self) -> UnlocalizedNumberRangeFormatter: ...

class Notation(java.lang.Object):
    @staticmethod
    def compactLong() -> CompactNotation: ...
    @staticmethod
    def compactShort() -> CompactNotation: ...
    @staticmethod
    def engineering() -> ScientificNotation: ...
    @staticmethod
    def scientific() -> ScientificNotation: ...
    @staticmethod
    def simple() -> SimpleNotation: ...

class NumberFormatter(java.lang.Object):
    @typing.overload
    @staticmethod
    def withLocale(locale: android.icu.util.ULocale, /) -> LocalizedNumberFormatter: ...
    @typing.overload
    @staticmethod
    def withLocale(locale: java.util.Locale, /) -> LocalizedNumberFormatter: ...
    @staticmethod
    def with_() -> UnlocalizedNumberFormatter: ...

    class UnitWidth(java.lang.Enum[NumberFormatter.UnitWidth]):
        FORMAL: typing.ClassVar[NumberFormatter.UnitWidth] = ...
        FULL_NAME: typing.ClassVar[NumberFormatter.UnitWidth] = ...
        HIDDEN: typing.ClassVar[NumberFormatter.UnitWidth] = ...
        ISO_CODE: typing.ClassVar[NumberFormatter.UnitWidth] = ...
        NARROW: typing.ClassVar[NumberFormatter.UnitWidth] = ...
        SHORT: typing.ClassVar[NumberFormatter.UnitWidth] = ...
        VARIANT: typing.ClassVar[NumberFormatter.UnitWidth] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberFormatter.UnitWidth: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberFormatter.UnitWidth]: ...

    class TrailingZeroDisplay(java.lang.Enum[NumberFormatter.TrailingZeroDisplay]):
        AUTO: typing.ClassVar[NumberFormatter.TrailingZeroDisplay] = ...
        HIDE_IF_WHOLE: typing.ClassVar[NumberFormatter.TrailingZeroDisplay] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberFormatter.TrailingZeroDisplay: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberFormatter.TrailingZeroDisplay]: ...

    class SignDisplay(java.lang.Enum[NumberFormatter.SignDisplay]):
        ACCOUNTING: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        ACCOUNTING_ALWAYS: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        ACCOUNTING_EXCEPT_ZERO: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        ACCOUNTING_NEGATIVE: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        ALWAYS: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        AUTO: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        EXCEPT_ZERO: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        NEGATIVE: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        NEVER: typing.ClassVar[NumberFormatter.SignDisplay] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberFormatter.SignDisplay: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberFormatter.SignDisplay]: ...

    class RoundingPriority(java.lang.Enum[NumberFormatter.RoundingPriority]):
        RELAXED: typing.ClassVar[NumberFormatter.RoundingPriority] = ...
        STRICT: typing.ClassVar[NumberFormatter.RoundingPriority] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberFormatter.RoundingPriority: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberFormatter.RoundingPriority]: ...

    class GroupingStrategy(java.lang.Enum[NumberFormatter.GroupingStrategy]):
        AUTO: typing.ClassVar[NumberFormatter.GroupingStrategy] = ...
        MIN2: typing.ClassVar[NumberFormatter.GroupingStrategy] = ...
        OFF: typing.ClassVar[NumberFormatter.GroupingStrategy] = ...
        ON_ALIGNED: typing.ClassVar[NumberFormatter.GroupingStrategy] = ...
        THOUSANDS: typing.ClassVar[NumberFormatter.GroupingStrategy] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberFormatter.GroupingStrategy: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberFormatter.GroupingStrategy]: ...

    class DecimalSeparatorDisplay(java.lang.Enum[NumberFormatter.DecimalSeparatorDisplay]):
        ALWAYS: typing.ClassVar[NumberFormatter.DecimalSeparatorDisplay] = ...
        AUTO: typing.ClassVar[NumberFormatter.DecimalSeparatorDisplay] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberFormatter.DecimalSeparatorDisplay: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberFormatter.DecimalSeparatorDisplay]: ...

_NumberFormatterSettings__T = typing.TypeVar('_NumberFormatterSettings__T', bound=NumberFormatterSettings[java.lang.Object])  # <T>
class NumberFormatterSettings(java.lang.Object, typing.Generic[_NumberFormatterSettings__T]):
    def decimal(self, style: NumberFormatter.DecimalSeparatorDisplay, /) -> _NumberFormatterSettings__T: ...
    def displayOptions(self, displayOptions: android.icu.text.DisplayOptions, /) -> _NumberFormatterSettings__T: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def grouping(self, strategy: NumberFormatter.GroupingStrategy, /) -> _NumberFormatterSettings__T: ...
    def hashCode(self) -> int: ...
    def integerWidth(self, style: IntegerWidth, /) -> _NumberFormatterSettings__T: ...
    def notation(self, notation: Notation, /) -> _NumberFormatterSettings__T: ...
    def perUnit(self, perUnit: android.icu.util.MeasureUnit, /) -> _NumberFormatterSettings__T: ...
    def precision(self, precision: Precision, /) -> _NumberFormatterSettings__T: ...
    def roundingMode(self, roundingMode: java.math.RoundingMode, /) -> _NumberFormatterSettings__T: ...
    def scale(self, scale: Scale, /) -> _NumberFormatterSettings__T: ...
    def sign(self, style: NumberFormatter.SignDisplay, /) -> _NumberFormatterSettings__T: ...
    @typing.overload
    def symbols(self, symbols: android.icu.text.DecimalFormatSymbols, /) -> _NumberFormatterSettings__T: ...
    @typing.overload
    def symbols(self, ns: android.icu.text.NumberingSystem, /) -> _NumberFormatterSettings__T: ...
    def unit(self, unit: android.icu.util.MeasureUnit, /) -> _NumberFormatterSettings__T: ...
    def unitWidth(self, style: NumberFormatter.UnitWidth, /) -> _NumberFormatterSettings__T: ...
    def usage(self, usage: str | java.lang.String, /) -> _NumberFormatterSettings__T: ...

class NumberRangeFormatter(java.lang.Object):
    @typing.overload
    @staticmethod
    def withLocale(locale: android.icu.util.ULocale, /) -> LocalizedNumberRangeFormatter: ...
    @typing.overload
    @staticmethod
    def withLocale(locale: java.util.Locale, /) -> LocalizedNumberRangeFormatter: ...
    @staticmethod
    def with_() -> UnlocalizedNumberRangeFormatter: ...

    class RangeIdentityResult(java.lang.Enum[NumberRangeFormatter.RangeIdentityResult]):
        EQUAL_AFTER_ROUNDING: typing.ClassVar[NumberRangeFormatter.RangeIdentityResult] = ...
        EQUAL_BEFORE_ROUNDING: typing.ClassVar[NumberRangeFormatter.RangeIdentityResult] = ...
        NOT_EQUAL: typing.ClassVar[NumberRangeFormatter.RangeIdentityResult] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberRangeFormatter.RangeIdentityResult: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberRangeFormatter.RangeIdentityResult]: ...

    class RangeIdentityFallback(java.lang.Enum[NumberRangeFormatter.RangeIdentityFallback]):
        APPROXIMATELY: typing.ClassVar[NumberRangeFormatter.RangeIdentityFallback] = ...
        APPROXIMATELY_OR_SINGLE_VALUE: typing.ClassVar[NumberRangeFormatter.RangeIdentityFallback] = ...
        RANGE: typing.ClassVar[NumberRangeFormatter.RangeIdentityFallback] = ...
        SINGLE_VALUE: typing.ClassVar[NumberRangeFormatter.RangeIdentityFallback] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberRangeFormatter.RangeIdentityFallback: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberRangeFormatter.RangeIdentityFallback]: ...

    class RangeCollapse(java.lang.Enum[NumberRangeFormatter.RangeCollapse]):
        ALL: typing.ClassVar[NumberRangeFormatter.RangeCollapse] = ...
        AUTO: typing.ClassVar[NumberRangeFormatter.RangeCollapse] = ...
        NONE: typing.ClassVar[NumberRangeFormatter.RangeCollapse] = ...
        UNIT: typing.ClassVar[NumberRangeFormatter.RangeCollapse] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NumberRangeFormatter.RangeCollapse: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NumberRangeFormatter.RangeCollapse]: ...

_NumberRangeFormatterSettings__T = typing.TypeVar('_NumberRangeFormatterSettings__T', bound=NumberRangeFormatterSettings[java.lang.Object])  # <T>
class NumberRangeFormatterSettings(java.lang.Object, typing.Generic[_NumberRangeFormatterSettings__T]):
    def collapse(self, collapse: NumberRangeFormatter.RangeCollapse, /) -> _NumberRangeFormatterSettings__T: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def hashCode(self) -> int: ...
    def identityFallback(self, identityFallback: NumberRangeFormatter.RangeIdentityFallback, /) -> _NumberRangeFormatterSettings__T: ...
    def numberFormatterBoth(self, formatter: UnlocalizedNumberFormatter, /) -> _NumberRangeFormatterSettings__T: ...
    def numberFormatterFirst(self, formatterFirst: UnlocalizedNumberFormatter, /) -> _NumberRangeFormatterSettings__T: ...
    def numberFormatterSecond(self, formatterSecond: UnlocalizedNumberFormatter, /) -> _NumberRangeFormatterSettings__T: ...

class Precision(java.lang.Object):
    @staticmethod
    def currency(currencyUsage: android.icu.util.Currency.CurrencyUsage, /) -> CurrencyPrecision: ...
    @staticmethod
    def fixedFraction(minMaxFractionPlaces: int | java.jint | java.lang.Integer, /) -> FractionPrecision: ...
    @staticmethod
    def fixedSignificantDigits(minMaxSignificantDigits: int | java.jint | java.lang.Integer, /) -> Precision: ...
    @staticmethod
    def increment(roundingIncrement: java.math.BigDecimal, /) -> Precision: ...
    @staticmethod
    def integer() -> FractionPrecision: ...
    @staticmethod
    def maxFraction(maxFractionPlaces: int | java.jint | java.lang.Integer, /) -> FractionPrecision: ...
    @staticmethod
    def maxSignificantDigits(maxSignificantDigits: int | java.jint | java.lang.Integer, /) -> Precision: ...
    @staticmethod
    def minFraction(minFractionPlaces: int | java.jint | java.lang.Integer, /) -> FractionPrecision: ...
    @staticmethod
    def minMaxFraction(minFractionPlaces: int | java.jint | java.lang.Integer, maxFractionPlaces: int | java.jint | java.lang.Integer, /) -> FractionPrecision: ...
    @staticmethod
    def minMaxSignificantDigits(minSignificantDigits: int | java.jint | java.lang.Integer, maxSignificantDigits: int | java.jint | java.lang.Integer, /) -> Precision: ...
    @staticmethod
    def minSignificantDigits(minSignificantDigits: int | java.jint | java.lang.Integer, /) -> Precision: ...
    def trailingZeroDisplay(self, trailingZeroDisplay: NumberFormatter.TrailingZeroDisplay, /) -> Precision: ...
    @staticmethod
    def unlimited() -> Precision: ...

class Scale(java.lang.Object):
    @staticmethod
    def byBigDecimal(multiplicand: java.math.BigDecimal, /) -> Scale: ...
    @staticmethod
    def byDouble(multiplicand: float | java.jdouble | java.lang.Double, /) -> Scale: ...
    @staticmethod
    def byDoubleAndPowerOfTen(multiplicand: float | java.jdouble | java.lang.Double, power: int | java.jint | java.lang.Integer, /) -> Scale: ...
    @staticmethod
    def none() -> Scale: ...
    @staticmethod
    def powerOfTen(power: int | java.jint | java.lang.Integer, /) -> Scale: ...

class ScientificNotation(Notation):
    def withExponentSignDisplay(self, exponentSignDisplay: NumberFormatter.SignDisplay, /) -> ScientificNotation: ...
    def withMinExponentDigits(self, minExponentDigits: int | java.jint | java.lang.Integer, /) -> ScientificNotation: ...

class SimpleNotation(Notation): ...

class UnlocalizedNumberFormatter(NumberFormatterSettings[UnlocalizedNumberFormatter]):
    @typing.overload
    def locale(self, locale: android.icu.util.ULocale, /) -> LocalizedNumberFormatter: ...
    @typing.overload
    def locale(self, locale: java.util.Locale, /) -> LocalizedNumberFormatter: ...

class UnlocalizedNumberRangeFormatter(NumberRangeFormatterSettings[UnlocalizedNumberRangeFormatter]):
    @typing.overload
    def locale(self, locale: android.icu.util.ULocale, /) -> LocalizedNumberRangeFormatter: ...
    @typing.overload
    def locale(self, locale: java.util.Locale, /) -> LocalizedNumberRangeFormatter: ...
