Codota Logo
libcore.icu
Code IndexAdd Codota to your IDE (free)

How to use libcore.icu

Best Java code snippets using libcore.icu (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: robovm/robovm

public char[] formatLong(long value, FieldPosition field) {
  FieldPositionIterator fpi = FieldPositionIterator.forFieldPosition(field);
  char[] result = formatLong(this.address, value, fpi);
  if (fpi != null) {
    FieldPositionIterator.setFieldPosition(fpi, field);
  }
  return result;
}
origin: robovm/robovm

private static long getFormatter(String skeleton, String localeName, String tzName) {
 String key = skeleton + "\t" + localeName + "\t" + tzName;
 Long formatter = CACHED_FORMATTERS.get(key);
 if (formatter != null) {
  return formatter;
 }
 long address = createDateIntervalFormat(skeleton, localeName, tzName);
 CACHED_FORMATTERS.put(key, address);
 return address;
}
origin: robovm/robovm

/**
 * Returns an ImmutableIndex created from this AlphabeticIndex.
 */
public synchronized ImmutableIndex getImmutableIndex() {
 return new ImmutableIndex(buildImmutableIndex(peer));
}
origin: robovm/robovm

public CollationKey getCollationKey(String source) {
  if (source == null) {
    return null;
  }
  byte[] key = NativeCollation.getSortKey(address, source);
  if (key == null) {
    return null;
  }
  return new CollationKeyICU(source, key);
}
origin: robovm/robovm

public char[] formatDouble(double value, FieldPosition field) {
  FieldPositionIterator fpi = FieldPositionIterator.forFieldPosition(field);
  char[] result = formatDouble(this.address, value, fpi);
  if (fpi != null) {
    FieldPositionIterator.setFieldPosition(fpi, field);
  }
  return result;
}
origin: robovm/robovm

public static CollationElementIteratorICU getInstance(long collatorAddress, String source) {
  long iteratorAddress = NativeCollation.getCollationElementIterator(collatorAddress, source);
  return new CollationElementIteratorICU(iteratorAddress);
}
origin: robovm/robovm

/**
 * Sets a new source string iterator for iteration, and resets the offset to
 * the beginning of the text.
 *
 * @param source
 *            the new source string iterator for iteration.
 */
public void setText(CharacterIterator source) {
  this.icuIterator.setText(source);
}
origin: robovm/robovm

/**
 * Adds the index characters in the range between the specified start and
 * end code points, inclusive.
 */
public synchronized AlphabeticIndex addLabelRange(int codePointStart, int codePointEnd) {
 addLabelRange(peer, codePointStart, codePointEnd);
 return this;
}
origin: robovm/robovm

/**
 * Indicates whether grouping will be used in this format.
 *
 * @return {@code true} if grouping is used; {@code false} otherwise.
 */
@Override
public boolean isGroupingUsed() {
  return ndf.isGroupingUsed();
}
origin: robovm/robovm

/**
 * Returns an array of strings containing all the two-letter ISO 3166 country codes that can be
 * used as the country code when constructing a {@code Locale}.
 */
public static String[] getISOCountries() {
  return ICU.getISOCountries();
}
origin: robovm/robovm

/**
 * Returns the number of digits grouped together by the grouping separator.
 * This only allows to get the primary grouping size. There is no API to get
 * the secondary grouping size.
 *
 * @return the number of digits grouped together.
 */
public int getGroupingSize() {
  return ndf.getGroupingSize();
}
origin: robovm/robovm

/**
 * Repositions the cursor to point at the first element of the current
 * string. The next call to {@link #next()} or {@link #previous()} will
 * return the first and last collation element in the string, respectively.
 * <p>
 * If the {@code RuleBasedCollator} used by this iterator has had its
 * attributes changed, calling {@code reset()} reinitializes the iterator to
 * use the new attributes.
 */
public void reset() {
  this.icuIterator.reset();
}
origin: robovm/robovm

/**
 * Returns the number of the label buckets in this index.
 */
public int getBucketCount() {
 return getBucketCount(peer);
}
origin: robovm/robovm

  /**
   * Obtains the tertiary order of the specified collation element, i.e. the
   * last 8 bits. This value is unsigned.
   *
   * @param order
   *            the element of the collation.
   * @return the 8 bit tertiary order of the element.
   */
  public static final short tertiaryOrder(int order) {
    return (short) CollationElementIteratorICU.tertiaryOrder(order);
  }
}
origin: robovm/robovm

@Override public boolean equals(Object o) {
  if (!(o instanceof RuleBasedBreakIterator)) {
    return false;
  }
  return wrapped.equals(((RuleBasedBreakIterator) o).wrapped);
}
origin: robovm/robovm

/**
 * Returns the pattern of this decimal format using non-localized pattern
 * characters.
 *
 * @return the non-localized pattern.
 */
public String toPattern() {
  return ndf.toPattern();
}
origin: robovm/robovm

/**
 * Returns an array of locales for which custom {@code DateFormatSymbols} instances
 * are available.
 * <p>Note that Android does not support user-supplied locale service providers.
 * @since 1.6
 */
public static Locale[] getAvailableLocales() {
  return ICU.getAvailableDateFormatSymbolsLocales();
}
origin: robovm/robovm

/**
 * Sets whether the decimal separator is shown when there are no fractional
 * digits.
 *
 * @param value
 *            {@code true} if the decimal separator should always be
 *            formatted; {@code false} otherwise.
 */
public void setDecimalSeparatorAlwaysShown(boolean value) {
  ndf.setDecimalSeparatorAlwaysShown(value);
}
origin: robovm/robovm

/**
 * This value indicates whether the return object of the parse operation is
 * of type {@code BigDecimal}. This value defaults to {@code false}.
 *
 * @return {@code true} if parse always returns {@code BigDecimals},
 *         {@code false} if the type of the result is {@code Long} or
 *         {@code Double}.
 */
public boolean isParseBigDecimal() {
  return ndf.isParseBigDecimal();
}
origin: robovm/robovm

/**
 * Obtains the next collation element in the source string.
 *
 * @return the next collation element or {@code NULLORDER} if the end
 *         of the iteration has been reached.
 */
public int next() {
  return this.icuIterator.next();
}
libcore.icu

Most used classes

  • DateIntervalFormat
    Exposes icu4c's DateIntervalFormat.
  • ICU
    Makes ICU data accessible to Java.
  • LocaleData
  • AlphabeticIndex$ImmutableIndex
    Exposes icu4c's ImmutableIndex (new to icu 51). This exposes a read-only, thread safe snapshot view
  • AlphabeticIndex
    Exposes icu4c's AlphabeticIndex.
  • CollationKeyICU,
  • DateIntervalFormat$FormatterCache,
  • NativeBreakIterator,
  • NativeCollation,
  • NativeConverter,
  • NativeDecimalFormat$FieldPositionIterator,
  • NativeDecimalFormat,
  • NativeIDN,
  • NativeNormalizer,
  • NativePluralRules,
  • RuleBasedCollatorICU,
  • TimeZoneNames$ZoneStringsCache,
  • TimeZoneNames,
  • Transliterator
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now