Tabnine Logo
NativeDecimalFormat.formatLong
Code IndexAdd Tabnine 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)

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
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now