Codota Logo
NativeDecimalFormat.formatLong
Code IndexAdd Codota to your IDE (free)

How to use
formatLong
method
in
libcore.icu.NativeDecimalFormat

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

  • Common ways to obtain NativeDecimalFormat
private void myMethod () {
NativeDecimalFormat n =
  • Codota IconString pattern;DecimalFormatSymbols dfs;new NativeDecimalFormat(pattern, dfs)
  • Codota IconObject object;(NativeDecimalFormat) object.clone()
  • Codota IconString pattern;LocaleData data;new NativeDecimalFormat(pattern, data)
  • 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

@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  buffer.append(ndf.formatLong(value, position));
  return buffer;
}
origin: robovm/robovm

@Override
public final StringBuffer format(Object number, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  if (number instanceof BigInteger) {
    BigInteger bigInteger = (BigInteger) number;
    char[] chars = (bigInteger.bitLength() < 64)
        ? ndf.formatLong(bigInteger.longValue(), position)
        : ndf.formatBigInteger(bigInteger, position);
    buffer.append(chars);
    return buffer;
  } else if (number instanceof BigDecimal) {
    buffer.append(ndf.formatBigDecimal((BigDecimal) number, position));
    return buffer;
  }
  return super.format(number, buffer, position);
}
origin: robovm/robovm

public AttributedCharacterIterator formatToCharacterIterator(Object object) {
  if (object == null) {
    throw new NullPointerException("object == null");
  }
  if (!(object instanceof Number)) {
    throw new IllegalArgumentException("object not a Number: " + object.getClass());
  }
  Number number = (Number) object;
  FieldPositionIterator fpIter = new FieldPositionIterator();
  String text;
  if (number instanceof BigInteger || number instanceof BigDecimal) {
    text = new String(formatDigitList(this.address, number.toString(), fpIter));
  } else if (number instanceof Double || number instanceof Float) {
    double dv = number.doubleValue();
    text = new String(formatDouble(this.address, dv, fpIter));
  } else {
    long lv = number.longValue();
    text = new String(formatLong(this.address, lv, fpIter));
  }
  AttributedString as = new AttributedString(text);
  while (fpIter.next()) {
    Format.Field field = fpIter.field();
    as.addAttribute(field, field, fpIter.start(), fpIter.limit());
  }
  // return the CharacterIterator from AttributedString
  return as.getIterator();
}
origin: MobiVM/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: MobiVM/robovm

@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  buffer.append(ndf.formatLong(value, position));
  return buffer;
}
origin: com.mobidevelop.robovm/robovm-rt

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: com.gluonhq/robovm-rt

@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  buffer.append(ndf.formatLong(value, position));
  return buffer;
}
origin: ibinti/bugvm

@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  buffer.append(ndf.formatLong(value, position));
  return buffer;
}
origin: com.mobidevelop.robovm/robovm-rt

@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  buffer.append(ndf.formatLong(value, position));
  return buffer;
}
origin: com.bugvm/bugvm-rt

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: com.bugvm/bugvm-rt

@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  buffer.append(ndf.formatLong(value, position));
  return buffer;
}
origin: FlexoVM/flexovm

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: FlexoVM/flexovm

@Override
public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  buffer.append(ndf.formatLong(value, position));
  return buffer;
}
origin: ibinti/bugvm

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: com.gluonhq/robovm-rt

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: MobiVM/robovm

@Override
public final StringBuffer format(Object number, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  if (number instanceof BigInteger) {
    BigInteger bigInteger = (BigInteger) number;
    char[] chars = (bigInteger.bitLength() < 64)
        ? ndf.formatLong(bigInteger.longValue(), position)
        : ndf.formatBigInteger(bigInteger, position);
    buffer.append(chars);
    return buffer;
  } else if (number instanceof BigDecimal) {
    buffer.append(ndf.formatBigDecimal((BigDecimal) number, position));
    return buffer;
  }
  return super.format(number, buffer, position);
}
origin: ibinti/bugvm

@Override
public final StringBuffer format(Object number, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  if (number instanceof BigInteger) {
    BigInteger bigInteger = (BigInteger) number;
    char[] chars = (bigInteger.bitLength() < 64)
        ? ndf.formatLong(bigInteger.longValue(), position)
        : ndf.formatBigInteger(bigInteger, position);
    buffer.append(chars);
    return buffer;
  } else if (number instanceof BigDecimal) {
    buffer.append(ndf.formatBigDecimal((BigDecimal) number, position));
    return buffer;
  }
  return super.format(number, buffer, position);
}
origin: com.mobidevelop.robovm/robovm-rt

@Override
public final StringBuffer format(Object number, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  if (number instanceof BigInteger) {
    BigInteger bigInteger = (BigInteger) number;
    char[] chars = (bigInteger.bitLength() < 64)
        ? ndf.formatLong(bigInteger.longValue(), position)
        : ndf.formatBigInteger(bigInteger, position);
    buffer.append(chars);
    return buffer;
  } else if (number instanceof BigDecimal) {
    buffer.append(ndf.formatBigDecimal((BigDecimal) number, position));
    return buffer;
  }
  return super.format(number, buffer, position);
}
origin: com.bugvm/bugvm-rt

@Override
public final StringBuffer format(Object number, StringBuffer buffer, FieldPosition position) {
  checkBufferAndFieldPosition(buffer, position);
  if (number instanceof BigInteger) {
    BigInteger bigInteger = (BigInteger) number;
    char[] chars = (bigInteger.bitLength() < 64)
        ? ndf.formatLong(bigInteger.longValue(), position)
        : ndf.formatBigInteger(bigInteger, position);
    buffer.append(chars);
    return buffer;
  } else if (number instanceof BigDecimal) {
    buffer.append(ndf.formatBigDecimal((BigDecimal) number, position));
    return buffer;
  }
  return super.format(number, buffer, position);
}
libcore.icuNativeDecimalFormatformatLong

Popular methods of NativeDecimalFormat

  • <init>
  • applyLocalizedPattern
  • applyPattern
  • applyPatternImpl
  • clone
  • cloneImpl
  • close
  • equals
    Note: this doesn't check that the underlying native DecimalFormat objects' configured native Decimal
  • formatBigDecimal
  • formatBigInteger
  • formatDigitList
  • formatDouble
  • formatDigitList,
  • formatDouble,
  • formatToCharacterIterator,
  • getAttribute,
  • getGroupingSize,
  • getMaximumFractionDigits,
  • getMaximumIntegerDigits,
  • getMinimumFractionDigits,
  • getMinimumIntegerDigits

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
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