Returns a copy of this style with the specified decimal point setting.

@param forceDecimalPoint  true to force the use of the decimal point, false to use it if required
@return the new instance for chaining, never null
352746
public MoneyAmountStyle withForcedDecimalPoint(boolean forceDecimalPoint) {
        if (this.forceDecimalPoint == forceDecimalPoint) {
            return this;
        }
        return new MoneyAmountStyle(
                zeroCharacter,
                positiveCharacter, negativeCharacter,
                decimalPointCharacter, groupingStyle,
                groupingCharacter, groupingSize, extendedGroupingSize, forceDecimalPoint, absValue);
    }
1312756
public static Decimal fromLong(long l, int precision, int scale) {
		checkArgument(precision > 0 && precision <= MAX_LONG_DIGITS);
		checkArgument((l >= 0 ? l : -l) < POW10[precision]);
		return new Decimal(precision, scale, l, null);
	}
1231067
public BigDecimal toBigDecimal(int scale, Rounding roundingMode) {
        return toBigDecimal(scale, roundingMode, getProperties().hasStripTrailingZeros());
    }
1319399
public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) {
        return new CompactDecimalFormat(ULocale.forLocale(locale), style);
    }
928302
@SuppressWarnings("NumericCastThatLosesPrecision")
    @Nonnull
    static Point fromLatLonFractions(final double latFraction, final double lonFraction) {
        final Point p = new Point();
        p.latMicroDeg = (int) Math.floor(latFraction / LAT_MICRODEG_TO_FRACTIONS_FACTOR);
        p.latFractionOnlyDeg = (int) (latFraction - (LAT_MICRODEG_TO_FRACTIONS_FACTOR * p.latMicroDeg));
        p.lonMicroDeg = (int) Math.floor(lonFraction / LON_MICRODEG_TO_FRACTIONS_FACTOR);
        p.lonFractionOnlyDeg = (int) (lonFraction - (LON_MICRODEG_TO_FRACTIONS_FACTOR * p.lonMicroDeg));
        p.defined = true;
        return p.wrap();
    }
611915
public PointList copy(int from, int end) {
        if (from > end)
            throw new IllegalArgumentException("from must be smaller or equal to end");
        if (from < 0 || end > getSize())
            throw new IllegalArgumentException("Illegal interval: " + from + ", " + end + ", size:" + getSize());


        PointList thisPL = this;
        if (this instanceof ShallowImmutablePointList) {
            ShallowImmutablePointList spl = (ShallowImmutablePointList) this;
            thisPL = spl.wrappedPointList;
            from = spl.fromOffset + from;
            end = spl.fromOffset + end;
        }

        int len = end - from;
        PointList copyPL = new PointList(len, is3D());
        copyPL.size = len;
        copyPL.isImmutable = isImmutable();
        System.arraycopy(thisPL.latitudes, from, copyPL.latitudes, 0, len);
        System.arraycopy(thisPL.longitudes, from, copyPL.longitudes, 0, len);
        if (is3D())
            System.arraycopy(thisPL.elevations, from, copyPL.elevations, 0, len);
        return copyPL;
    }
1183867
public static BigDecimal sqrtUsingNewtonPrint(BigDecimal x, MathContext mathContext) {
		switch (x.signum()) {
		case 0:
			return ZERO;
		case -1:
			throw new ArithmeticException("Illegal sqrt(x) for x < 0: x = " + x);
		}

		MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode());
		BigDecimal acceptableError = ONE.movePointLeft(mathContext.getPrecision() + 1);

		BigDecimal result = BigDecimal.valueOf(Math.sqrt(x.doubleValue()));
		BigDecimal last;

		do {
			last = result;
			result = x.divide(result, mc).add(last).divide(TWO, mc);
			System.out.printf("%5d, ", countSameCharacters(last.toPlainString(), result.toPlainString()));
		} while (result.subtract(last).abs().compareTo(acceptableError) > 0);
		
		return result.round(mathContext);
	}
1320481
public static int getForceRotatedInvertedExifOrientation(
      RotationOptions rotationOptions, EncodedImage encodedImage) {
    int exifOrientation = encodedImage.getExifOrientation();
    int index = INVERTED_EXIF_ORIENTATIONS.indexOf(exifOrientation);
    if (index < 0) {
      throw new IllegalArgumentException("Only accepts inverted exif orientations");
    }
    int forcedAngle = RotationOptions.NO_ROTATION;
    if (!rotationOptions.useImageMetadata()) {
      forcedAngle = rotationOptions.getForcedAngle();
    }
    int timesToRotate = forcedAngle / 90;
    return INVERTED_EXIF_ORIENTATIONS.get(
        (index + timesToRotate) % INVERTED_EXIF_ORIENTATIONS.size());
  }
667261
public com.google.api.ads.adwords.axis.v201809.cm.GeoPoint getGeoPoint() {
        return geoPoint;
    }
796669
@Nonnull
    public static Point fromMicroDeg(final int latMicroDeg, final int lonMicroDeg) {
        final Point p = new Point();
        p.latMicroDeg = latMicroDeg;
        p.latFractionOnlyDeg = 0;
        p.lonMicroDeg = lonMicroDeg;
        p.lonFractionOnlyDeg = 0;
        p.defined = true;
        return p.wrap();
    }
560296
public Point toWgs84(Point point) {
        if (projection != null) {
            point = toWgs84.transform(point);
        }
        return point;
    }
685785
public static Point getPixelRelative(LatLong latLong, long mapSize, double x, double y) {
        double pixelX = MercatorProjection.longitudeToPixelX(latLong.longitude, mapSize) - x;
        double pixelY = MercatorProjection.latitudeToPixelY(latLong.latitude, mapSize) - y;
        return new Point(pixelX, pixelY);
    }
71403
@Pure
	public static ShapeElementType toESRI(Class<? extends MapElement> type) {
		if (MapPolyline.class.isAssignableFrom(type)) {
			return ShapeElementType.POLYLINE;
		}
		if (MapPolygon.class.isAssignableFrom(type)) {
			return ShapeElementType.POLYGON;
		}
		if (MapMultiPoint.class.isAssignableFrom(type)) {
			return ShapeElementType.MULTIPOINT;
		}
		if (MapPoint.class.isAssignableFrom(type)) {
			return ShapeElementType.POINT;
		}
		throw new IllegalArgumentException();
	}
309811
static Point2D toAwtPoint(Point2d point) {
        return new Point2D.Double(point.x, point.y);
    }
847099
public static Point getPixelRelative(LatLong latLong, long mapSize, Point origin) {
        return getPixelRelative(latLong, mapSize, origin.x, origin.y);
    }
525569
public MoneyAmountStyle withDecimalPointCharacter(Character decimalPointCharacter) {
        int dpVal = (decimalPointCharacter == null ? -1 : decimalPointCharacter);
        if (dpVal == this.decimalPointCharacter) {
            return this;
        }
        return new MoneyAmountStyle(
                zeroCharacter,
                positiveCharacter, negativeCharacter,
                dpVal, groupingStyle,
                groupingCharacter, groupingSize, extendedGroupingSize, forceDecimalPoint, absValue);
    }
1150929
@Override
    public RoundedMoney divideToIntegralValue(Number divisor) {
        MathContext mc = monetaryContext.get(MathContext.class);
        if(mc==null){
            mc = MathContext.DECIMAL64;
        }
        BigDecimal dec = number.divideToIntegralValue(MoneyUtils.getBigDecimal(divisor), mc);
        return new RoundedMoney(dec, currency, rounding);
    }