Gibt zurueck ob das aktuelle Zeichen ein Special Buchstabe ist (_,<euro>,$,<pound>).

@return Gibt zurueck ob das aktuelle Zeichen ein Buchstabe ist.
197608
public boolean isCurrentSpecial() {
	if (!isValidIndex()) return false;
	return lcText[pos] == '_' || lcText[pos] == '$' || lcText[pos] == SystemUtil.SYMBOL_EURO || lcText[pos] == SystemUtil.SYMBOL_POUND;
    }
437025
public static Waehrung of(Currency currency) {
        String key = currency.getCurrencyCode();
        return CACHE.computeIfAbsent(key, t -> new Waehrung(currency));
    }
618220
@Override
    public RoundedMoney subtract(MonetaryAmount amount) {
        MoneyUtils.checkAmountParameter(amount, currency);
        if (amount.isZero()) {
            return this;
        }
        return new RoundedMoney(number.subtract(amount.getNumber().numberValue(BigDecimal.class),
                Optional.ofNullable(
                        monetaryContext.get(MathContext.class)).orElse(MathContext.DECIMAL64)),
                currency, rounding);
    }
884620
def currency=(currency)
      validator = EnumAttributeValidator.new('String', ["UNKNOWN_CURRENCY", "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "USS", "UYI", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XTS", "XXX", "YER", "ZAR", "ZMK", "ZMW", "BTC"])
      unless validator.valid?(currency)
        fail ArgumentError, "invalid value for 'currency', must be one of #{validator.allowable_values}."
      end
      @currency = currency
    end
1063853
public static BigDecimal validate(BigDecimal zahl, CurrencyUnit currency) {
        if (zahl.scale() == 0) {
            return zahl.setScale(currency.getDefaultFractionDigits(), RoundingMode.HALF_UP);
        }
        return zahl;
    }
834947
public function getCurrency() : ?string 
    {
        if ( ! $this->hasCurrency()) {
            $this->setCurrency($this->getDefaultCurrency());
        }
        return $this->currency;
    }
982994
public float floatValue() {
        BigDecimal adivb = (new BigDecimal(a)).divide(new BigDecimal(b), MathContext.DECIMAL128);
        return adivb.floatValue();
    }
1119312
public RoundingContextBuilder setCurrency(CurrencyUnit currencyUnit) {
        Objects.requireNonNull(currencyUnit);
        return set(CurrencyUnit.class, currencyUnit);
    }
752638
public static MonetaryAmountDecimalFormatBuilder newInstance() {
        MonetaryAmountDecimalFormatBuilder builder = new MonetaryAmountDecimalFormatBuilder();
        builder.decimalFormat = (DecimalFormat) NumberFormat.getCurrencyInstance();
        return builder;
    }
196436
public BigDecimal getValueAsBigDecimal() {
        String value = (String) $(valueBoxBase.getElement()).val();
        if (value != null && !value.isEmpty()) {
            return new BigDecimal(value);
        } else {
            return null;
        }
    }
1062234
public function Nice()
    {
        if (!$this->exists()) {
            return null;
        }
        $amount = $this->getAmount();
        $currency = $this->getCurrency();

        // Without currency, format as basic localised number
        $formatter = $this->getFormatter();
        if (!$currency) {
            return $formatter->format($amount);
        }

        // Localise currency
        return $formatter->formatCurrency($amount, $currency);
    }
738725
public static Currency getInstance(ULocale locale) {
        String currency = locale.getKeywordValue("currency");
        if (currency != null) {
            return getInstance(currency);
        }

        if (shim == null) {
            return createCurrency(locale);
        }

        return shim.createInstance(locale);
    }
681744
@Override
    public int compareTo(MonetaryAmount o) {
        Objects.requireNonNull(o);
        int compare;
        if (currency.equals(o.getCurrency())) {
            compare = asNumberStripped().compareTo(RoundedMoney.from(o).asNumberStripped());
        } else {
            compare = currency.getCurrencyCode().compareTo(o.getCurrency().getCurrencyCode());
        }
        return compare;
    }
96596
@Override
    public int compareTo(MonetaryAmount o) {
        Objects.requireNonNull(o);
        int compare = getCurrency().getCurrencyCode().compareTo(o.getCurrency().getCurrencyCode());
        if (compare == 0) {
            compare = this.number.compareTo(Money.from(o).number);
        }
        return compare;
    }
1196406
private String getCurrencyFormat(CurrencySymbolPosition position)
   {
      String result;

      switch (position)
      {
         case AFTER:
         {
            result = "1.1#";
            break;
         }

         case AFTER_WITH_SPACE:
         {
            result = "1.1 #";
            break;
         }

         case BEFORE_WITH_SPACE:
         {
            result = "# 1.1";
            break;
         }

         default:
         case BEFORE:
         {
            result = "#1.1";
            break;
         }
      }

      return result;
   }
360544
public static Currency getInstance(String currencyCode) {
        synchronized (codesToCurrencies) {
            Currency currency = codesToCurrencies.get(currencyCode);
            if (currency == null) {
                currency = new Currency(currencyCode);
                codesToCurrencies.put(currencyCode, currency);
            }
            return currency;
        }
    }
75154
public MonetaryRounding getRounding(RoundingQuery roundingQuery) {
        if (roundingQuery.get(LocalDateTime.class) != null || roundingQuery.get(LocalDate.class) != null) {
            return null;
        }
        CurrencyUnit currency = roundingQuery.getCurrency();
        if (currency != null) {
            RoundingMode roundingMode = roundingQuery.get(RoundingMode.class);
            if (roundingMode == null) {
                roundingMode = RoundingMode.HALF_EVEN;
            }
            // Simple hack to honor: https://en.wikipedia.org/wiki/Cash_rounding#Rounding_with_1.00_intervals
            if (Boolean.TRUE.equals(roundingQuery.getBoolean("cashRounding"))) {
                if ("CHF".equals(currency.getCurrencyCode())) {
                    return new DefaultCashRounding(currency, RoundingMode.HALF_UP, 5);
                } else if ("SEK".equals(currency.getCurrencyCode())) {
                    return new DefaultCashRounding(currency, RoundingMode.HALF_UP, 100);
                } else if ("NOK".equals(currency.getCurrencyCode())) {
                    return new DefaultCashRounding(currency, RoundingMode.HALF_UP, 100);
                } else if ("¨CNY".equals(currency.getCurrencyCode())) {
                    return new DefaultCashRounding(currency, RoundingMode.HALF_UP, 10);
                } else if ("¨HKD".equals(currency.getCurrencyCode())) {
                    return new DefaultCashRounding(currency, RoundingMode.HALF_UP, 10);
                } else if ("¨NZD".equals(currency.getCurrencyCode())) {
                    return new DefaultCashRounding(currency, RoundingMode.HALF_DOWN, 10);
                } else {
                    return new DefaultCashRounding(currency, 1);
                }
            }
            return new DefaultRounding(currency, roundingMode);
        }
        Integer scale = roundingQuery.getScale();
        if (scale == null) {
            scale = 2;
        }
        MathContext mc = roundingQuery.get(MathContext.class);
        RoundingMode roundingMode = roundingQuery.get(RoundingMode.class);
        if (mc != null) {
            return new DefaultRounding(scale, mc.getRoundingMode());
        } else if (roundingMode != null) {
            return new DefaultRounding(scale, roundingMode);
        } else if (roundingQuery.getRoundingName() != null && DEFAULT_ROUNDING_NAME.equals(roundingQuery.getRoundingName())) {
            return Monetary.getDefaultRounding();
        }
        return null;
    }