#
# Licensed to Elasticsearch under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Painless definition file. This defines the hierarchy of classes,
# what methods and fields they have, etc.
#

#### Interfaces

class AttributedCharacterIterator -> java.text.AttributedCharacterIterator extends CharacterIterator {
  Set getAllAttributeKeys()
  def getAttribute(AttributedCharacterIterator.Attribute)
  Map getAttributes()
  int getRunLimit()
  int getRunLimit(Set)
  int getRunStart()
  int getRunStart(Set)
}

class CharacterIterator -> java.text.CharacterIterator {
  char DONE
  def clone()
  char current()
  char first()
  int getBeginIndex()
  int getEndIndex()
  int getIndex()
  char last()
  char next()
  char previous()
  char setIndex(int)
}

#### Classes

class Annotation -> java.text.Annotation extends Object {
  Annotation <init>(Object)
  def getValue()
}

class AttributedCharacterIterator.Attribute -> java.text.AttributedCharacterIterator$Attribute extends Object {
  AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT
  AttributedCharacterIterator.Attribute LANGUAGE
  AttributedCharacterIterator.Attribute READING
}

class AttributedString -> java.text.AttributedString extends Object {
  AttributedString <init>(String)
  AttributedString <init>(String,Map)
  void addAttribute(AttributedCharacterIterator.Attribute,Object)
  void addAttribute(AttributedCharacterIterator.Attribute,Object,int,int)
  void addAttributes(Map,int,int)
  AttributedCharacterIterator getIterator()
  AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[])
  AttributedCharacterIterator getIterator(AttributedCharacterIterator.Attribute[],int,int)
}

class Bidi -> java.text.Bidi extends Object {
  int DIRECTION_DEFAULT_LEFT_TO_RIGHT
  int DIRECTION_DEFAULT_RIGHT_TO_LEFT
  int DIRECTION_LEFT_TO_RIGHT
  int DIRECTION_RIGHT_TO_LEFT
  Bidi <init>(AttributedCharacterIterator)
  Bidi <init>(char[],int,byte[],int,int,int)
  Bidi <init>(String,int)
  boolean baseIsLeftToRight()
  Bidi createLineBidi(int,int)
  int getBaseLevel()
  int getLength()
  int getLevelAt(int)
  int getRunCount()
  int getRunLevel(int)
  int getRunLimit(int)
  int getRunStart(int)
  boolean isLeftToRight()
  boolean isMixed()
  boolean isRightToLeft()
  void reorderVisually(byte[],int,Object[],int,int)
  boolean requiresBidi(char[],int,int)
}

class BreakIterator -> java.text.BreakIterator extend Object {
  int DONE
  def clone()
  int current()
  int first()
  int following(int)
  Locale[] getAvailableLocales()
  BreakIterator getCharacterInstance()
  BreakIterator getCharacterInstance(Locale)
  BreakIterator getLineInstance()
  BreakIterator getLineInstance(Locale)
  BreakIterator getSentenceInstance()
  BreakIterator getSentenceInstance(Locale)
  CharacterIterator getText()
  BreakIterator getWordInstance()
  BreakIterator getWordInstance(Locale)
  boolean isBoundary(int)
  int last()
  int next()
  int next(int)
  int preceding(int)
  int previous()
  void setText(String)
}

class ChoiceFormat -> java.text.ChoiceFormat extends NumberFormat,Format,Object {
  ChoiceFormat <init>(double[],String[])
  ChoiceFormat <init>(String)
  void applyPattern(String)
  def[] getFormats()
  double[] getLimits()
  double nextDouble(double)
  double nextDouble(double,boolean)
  double previousDouble(double)
  void setChoices(double[],String[])
  String toPattern()
}

class CollationElementIterator -> java.text.CollationElementIterator extends Object {
  int NULLORDER
  int getMaxExpansion(int)
  int getOffset()
  int next()
  int previous()
  int primaryOrder(int)
  void reset()
  short secondaryOrder(int)
  void setOffset(int)
  void setText(String)
  short tertiaryOrder(int)
}

class CollationKey -> java.text.CollationKey extends Comparable,Object {
  int compareTo(CollationKey)
  String getSourceString()
  byte[] toByteArray()
}

class Collator -> java.text.Collator extends Comparator,Object {
  int CANONICAL_DECOMPOSITION
  int FULL_DECOMPOSITION
  int IDENTICAL
  int NO_DECOMPOSITION
  int PRIMARY
  int SECONDARY
  int TERTIARY
  def clone()
  boolean equals(String,String)
  Locale[] getAvailableLocales()
  CollationKey getCollationKey(String)
  int getDecomposition()
  Collator getInstance()
  Collator getInstance(Locale)
  int getStrength()
  void setDecomposition(int)
  void setStrength(int)
}

class DateFormat -> java.text.DateFormat extends Format,Object {
  int AM_PM_FIELD
  int DATE_FIELD
  int DAY_OF_WEEK_FIELD
  int DAY_OF_WEEK_IN_MONTH_FIELD
  int DAY_OF_YEAR_FIELD
  int DEFAULT
  int ERA_FIELD
  int FULL
  int HOUR_OF_DAY0_FIELD
  int HOUR_OF_DAY1_FIELD
  int HOUR0_FIELD
  int HOUR1_FIELD
  int LONG
  int MEDIUM
  int MILLISECOND_FIELD
  int MINUTE_FIELD
  int MONTH_FIELD
  int SECOND_FIELD
  int SHORT
  int TIMEZONE_FIELD
  int WEEK_OF_MONTH_FIELD
  int WEEK_OF_YEAR_FIELD
  int YEAR_FIELD
  Locale[] getAvailableLocales()
  Calendar getCalendar()
  DateFormat getDateInstance()
  DateFormat getDateInstance(int)
  DateFormat getDateInstance(int,Locale)
  DateFormat getDateTimeInstance()
  DateFormat getDateTimeInstance(int,int)
  DateFormat getDateTimeInstance(int,int,Locale)
  DateFormat getInstance()
  NumberFormat getNumberFormat()
  DateFormat getTimeInstance()
  DateFormat getTimeInstance(int)
  DateFormat getTimeInstance(int,Locale)
  TimeZone getTimeZone()
  boolean isLenient()
  Date parse(String)
  Date parse(String,ParsePosition)
  void setCalendar(Calendar)
  void setLenient(boolean)
  void setNumberFormat(NumberFormat)
  void setTimeZone(TimeZone)
}

class DateFormat.Field -> java.text.DateFormat$Field extends Format.Field,AttributedCharacterIterator.Attribute,Object {
  DateFormat.Field AM_PM
  DateFormat.Field DAY_OF_MONTH
  DateFormat.Field DAY_OF_WEEK
  DateFormat.Field DAY_OF_WEEK_IN_MONTH
  DateFormat.Field DAY_OF_YEAR
  DateFormat.Field ERA
  DateFormat.Field HOUR_OF_DAY0
  DateFormat.Field HOUR_OF_DAY1
  DateFormat.Field HOUR0
  DateFormat.Field HOUR1
  DateFormat.Field MILLISECOND
  DateFormat.Field MINUTE
  DateFormat.Field MONTH
  DateFormat.Field SECOND
  DateFormat.Field TIME_ZONE
  DateFormat.Field WEEK_OF_MONTH
  DateFormat.Field WEEK_OF_YEAR
  DateFormat.Field YEAR
  int getCalendarField()
  DateFormat.Field ofCalendarField(int)
}

class DateFormatSymbols -> java.text.DateFormatSymbols extends Object {
  DateFormatSymbols <init>()
  DateFormatSymbols <init>(Locale)
  def clone()
  String[] getAmPmStrings()
  Locale[] getAvailableLocales()
  String[] getEras()
  DateFormatSymbols getInstance()
  DateFormatSymbols getInstance(Locale)
  String getLocalPatternChars()
  String[] getMonths()
  String[] getShortMonths()
  String[] getShortWeekdays()
  String[] getWeekdays()
  String[][] getZoneStrings()
  int hashCode()
  void setAmPmStrings(String[])
  void setEras(String[])
  void setLocalPatternChars(String)
  void setMonths(String[])
  void setShortMonths(String[])
  void setShortWeekdays(String[])
  void setWeekdays(String[])
  void setZoneStrings(String[][])
}

class DecimalFormat -> java.text.DecimalFormat extends NumberFormat,Format,Object {
  DecimalFormat <init>()
  DecimalFormat <init>(String)
  DecimalFormat <init>(String,DecimalFormatSymbols)
  void applyLocalizedPattern(String)
  void applyPattern(String)
  DecimalFormatSymbols getDecimalFormatSymbols()
  int getGroupingSize()
  int getMultiplier()
  String getNegativePrefix()
  String getNegativeSuffix()
  String getPositivePrefix()
  String getPositiveSuffix()
  boolean isDecimalSeparatorAlwaysShown()
  boolean isParseBigDecimal()
  void setDecimalFormatSymbols(DecimalFormatSymbols)
  void setDecimalSeparatorAlwaysShown(boolean)
  void setGroupingSize(int)
  void setMultiplier(int)
  void setNegativePrefix(String)
  void setNegativeSuffix(String)
  void setPositivePrefix(String)
  void setPositiveSuffix(String)
  void setParseBigDecimal(boolean)
  String toLocalizedPattern()
  String toPattern()
}

class DecimalFormatSymbols -> java.text.DecimalFormatSymbols extends Object {
  DecimalFormatSymbols <init>()
  DecimalFormatSymbols <init>(Locale)
  def clone()
  Locale[] getAvailableLocales()
  Currency getCurrency()
  String getCurrencySymbol()
  char getDecimalSeparator()
  char getDigit()
  String getExponentSeparator()
  char getGroupingSeparator()
  String getInfinity()
  DecimalFormatSymbols getInstance()
  DecimalFormatSymbols getInstance(Locale)
  String getInternationalCurrencySymbol()
  char getMinusSign()
  char getMonetaryDecimalSeparator()
  String getNaN()
  char getPatternSeparator()
  char getPercent()
  char getPerMill()
  char getZeroDigit()
  void setCurrency(Currency)
  void setCurrencySymbol(String)
  void setDecimalSeparator(char)
  void setDigit(char)
  void setExponentSeparator(String)
  void setGroupingSeparator(char)
  void setInfinity(String)
  void setInternationalCurrencySymbol(String)
  void setMinusSign(char)
  void setMonetaryDecimalSeparator(char)
  void setNaN(String)
  void setPatternSeparator(char)
  void setPercent(char)
  void setPerMill(char)
  void setZeroDigit(char)
}

class FieldPosition -> java.text.FieldPosition extends Object {
  FieldPosition <init>(int)
  FieldPosition <init>(Format.Field,int)
  int getBeginIndex()
  int getEndIndex()
  int getField()
  Format.Field getFieldAttribute()
  void setBeginIndex(int)
  void setEndIndex(int)
}

class Format -> java.text.Format extends Object {
  def clone()
  String format(Object)
  StringBuffer format(Object,StringBuffer,FieldPosition)
  AttributedCharacterIterator formatToCharacterIterator(Object)
  Object parseObject(String)
  Object parseObject(String,ParsePosition)
}

class Format.Field -> java.text.Format$Field extends AttributedCharacterIterator.Attribute,Object {
}

class MessageFormat -> java.text.MessageFormat extends Format,Object {
  void applyPattern(String)
  String format(String,Object[])
  Format[] getFormats()
  Format[] getFormatsByArgumentIndex()
  Locale getLocale()
  Object[] parse(String)
  Object[] parse(String,ParsePosition)
  void setFormat(int,Format)
  void setFormatByArgumentIndex(int,Format)
  void setFormats(Format[])
  void setFormatsByArgumentIndex(Format[])
  void setLocale(Locale)
  String toPattern()
}

class MessageFormat.Field -> java.text.MessageFormat$Field extends Format.Field,AttributedCharacterIterator.Attribute,Object {
  MessageFormat.Field ARGUMENT
}

class Normalizer -> java.text.Normalizer extends Object {
  boolean isNormalized(CharSequence,Normalizer.Form)
  String normalize(CharSequence,Normalizer.Form)
}

class NumberFormat -> java.text.NumberFormat extends Format,Object {
  int FRACTION_FIELD
  int INTEGER_FIELD
  Locale[] getAvailableLocales()
  Currency getCurrency()
  NumberFormat getCurrencyInstance()
  NumberFormat getCurrencyInstance(Locale)
  NumberFormat getInstance()
  NumberFormat getInstance(Locale)
  NumberFormat getIntegerInstance()
  NumberFormat getIntegerInstance(Locale)
  int getMaximumFractionDigits()
  int getMaximumIntegerDigits()
  int getMinimumFractionDigits()
  int getMinimumIntegerDigits()
  NumberFormat getNumberInstance()
  NumberFormat getNumberInstance(Locale)
  NumberFormat getPercentInstance()
  NumberFormat getPercentInstance(Locale)
  RoundingMode getRoundingMode()
  boolean isGroupingUsed()
  boolean isParseIntegerOnly()
  Number parse(String)
  Number parse(String,ParsePosition)
  void setCurrency(Currency)
  void setGroupingUsed(boolean)
  void setMaximumFractionDigits(int)
  void setMaximumIntegerDigits(int)
  void setMinimumFractionDigits(int)
  void setMinimumIntegerDigits(int)
  void setParseIntegerOnly(boolean)
  void setRoundingMode(RoundingMode)
}

class NumberFormat.Field -> java.text.NumberFormat$Field extends Format.Field,AttributedCharacterIterator.Attribute,Object {
  NumberFormat.Field CURRENCY
  NumberFormat.Field DECIMAL_SEPARATOR
  NumberFormat.Field EXPONENT
  NumberFormat.Field EXPONENT_SIGN
  NumberFormat.Field EXPONENT_SYMBOL
  NumberFormat.Field FRACTION
  NumberFormat.Field GROUPING_SEPARATOR
  NumberFormat.Field INTEGER
  NumberFormat.Field PERCENT
  NumberFormat.Field PERMILLE
  NumberFormat.Field SIGN
}

class ParsePosition -> java.text.ParsePosition extends Object {
  ParsePosition <init>(int)
  int getErrorIndex()
  int getIndex()
  void setErrorIndex(int)
  void setIndex(int)
}

class RuleBasedCollator -> java.text.RuleBasedCollator extends Collator,Comparator,Object {
  RuleBasedCollator <init>(String)
  CollationElementIterator getCollationElementIterator(String)
  String getRules()
}

class SimpleDateFormat -> java.text.SimpleDateFormat extends DateFormat,Format,Object {
  SimpleDateFormat <init>()
  SimpleDateFormat <init>(String)
  SimpleDateFormat <init>(String,Locale)
  void applyLocalizedPattern(String)
  void applyPattern(String)
  Date get2DigitYearStart()
  DateFormatSymbols getDateFormatSymbols()
  void setDateFormatSymbols(DateFormatSymbols)
  void set2DigitYearStart(Date)
  String toLocalizedPattern()
  String toPattern()
}

class StringCharacterIterator -> java.text.StringCharacterIterator extends CharacterIterator,Object {
  StringCharacterIterator <init>(String)
  StringCharacterIterator <init>(String,int)
  StringCharacterIterator <init>(String,int,int,int)
  void setText(String)
}

#### Enums

class Normalizer.Form -> java.text.Normalizer$Form extends Enum,Object {
  Normalizer.Form NFC
  Normalizer.Form NFD
  Normalizer.Form NFKC
  Normalizer.Form NFKD
  Normalizer.Form valueOf(String)
  Normalizer.Form[] values()
}

#### Exceptions

class ParseException -> java.text.ParseException extends Exception,Object {
  ParseException <init>(String,int)
  int getErrorOffset()
}
