summaryrefslogtreecommitdiff
path: root/deps/icu-small/source/i18n/digitinterval.h
diff options
context:
space:
mode:
authorSteven R. Loomis <srloomis@us.ibm.com>2018-07-09 13:46:16 -0700
committerAnna Henningsen <anna@addaleax.net>2018-07-11 00:15:23 +0200
commit538acead6670d711ddb71c0b852089b792c996e3 (patch)
tree917c6df14436e66d4883feb7bb9269480fce06ab /deps/icu-small/source/i18n/digitinterval.h
parented715ef8900afa5056ebd5ef995e89eebd4987c2 (diff)
downloadandroid-node-v8-538acead6670d711ddb71c0b852089b792c996e3.tar.gz
android-node-v8-538acead6670d711ddb71c0b852089b792c996e3.tar.bz2
android-node-v8-538acead6670d711ddb71c0b852089b792c996e3.zip
deps: icu 62.1 bump (Unicode 11, CLDR 33.1)
- Full release notes: http://site.icu-project.org/download/62 Fixes: https://github.com/nodejs/node/issues/21452 PR-URL: https://github.com/nodejs/node/pull/21728 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'deps/icu-small/source/i18n/digitinterval.h')
-rw-r--r--deps/icu-small/source/i18n/digitinterval.h159
1 files changed, 0 insertions, 159 deletions
diff --git a/deps/icu-small/source/i18n/digitinterval.h b/deps/icu-small/source/i18n/digitinterval.h
deleted file mode 100644
index 95d406da20..0000000000
--- a/deps/icu-small/source/i18n/digitinterval.h
+++ /dev/null
@@ -1,159 +0,0 @@
-// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-/*
-*******************************************************************************
-* Copyright (C) 2015, International Business Machines
-* Corporation and others. All Rights Reserved.
-*******************************************************************************
-* digitinterval.h
-*
-* created on: 2015jan6
-* created by: Travis Keep
-*/
-
-#ifndef __DIGITINTERVAL_H__
-#define __DIGITINTERVAL_H__
-
-#include "unicode/uobject.h"
-#include "unicode/utypes.h"
-
-U_NAMESPACE_BEGIN
-
-/**
- * An interval of digits.
- * DigitIntervals are for fixed point formatting. A DigitInterval specifies
- * zero or more integer digits and zero or more fractional digits. This class
- * specifies particular digits in a number by their power of 10. For example,
- * the digit position just to the left of the decimal is 0, and the digit
- * position just left of that is 1. The digit position just to the right of
- * the decimal is -1. The digit position just to the right of that is -2.
- */
-class U_I18N_API DigitInterval : public UMemory {
-public:
-
- /**
- * Spans all integer and fraction digits
- */
- DigitInterval()
- : fLargestExclusive(INT32_MAX), fSmallestInclusive(INT32_MIN) { }
-
-
- /**
- * Makes this instance span all digits.
- */
- void clear() {
- fLargestExclusive = INT32_MAX;
- fSmallestInclusive = INT32_MIN;
- }
-
- /**
- * Returns TRUE if this interval contains this digit position.
- */
- UBool contains(int32_t digitPosition) const;
-
- /**
- * Returns true if this object is the same as rhs.
- */
- UBool equals(const DigitInterval &rhs) const {
- return ((fLargestExclusive == rhs.fLargestExclusive) &&
- (fSmallestInclusive == rhs.fSmallestInclusive));
- }
-
- /**
- * Expand this interval so that it contains all of rhs.
- */
- void expandToContain(const DigitInterval &rhs);
-
- /**
- * Shrink this interval so that it contains no more than rhs.
- */
- void shrinkToFitWithin(const DigitInterval &rhs);
-
- /**
- * Expand this interval as necessary to contain digit with given exponent
- * After this method returns, this interval is guaranteed to contain
- * digitExponent.
- */
- void expandToContainDigit(int32_t digitExponent);
-
- /**
- * Changes the number of digits to the left of the decimal point that
- * this interval spans. If count is negative, it means span all digits
- * to the left of the decimal point.
- */
- void setIntDigitCount(int32_t count);
-
- /**
- * Changes the number of digits to the right of the decimal point that
- * this interval spans. If count is negative, it means span all digits
- * to the right of the decimal point.
- */
- void setFracDigitCount(int32_t count);
-
- /**
- * Sets the least significant inclusive value to smallest. If smallest >= 0
- * then least significant inclusive value becomes 0.
- */
- void setLeastSignificantInclusive(int32_t smallest) {
- fSmallestInclusive = smallest < 0 ? smallest : 0;
- }
-
- /**
- * Sets the most significant exclusive value to largest.
- * If largest <= 0 then most significant exclusive value becomes 0.
- */
- void setMostSignificantExclusive(int32_t largest) {
- fLargestExclusive = largest > 0 ? largest : 0;
- }
-
- /**
- * If returns 8, the most significant digit in interval is the 10^7 digit.
- * Returns INT32_MAX if this interval spans all digits to left of
- * decimal point.
- */
- int32_t getMostSignificantExclusive() const {
- return fLargestExclusive;
- }
-
- /**
- * Returns number of digits to the left of the decimal that this
- * interval includes. This is a synonym for getMostSignificantExclusive().
- */
- int32_t getIntDigitCount() const {
- return fLargestExclusive;
- }
-
- /**
- * Returns number of digits to the right of the decimal that this
- * interval includes.
- */
- int32_t getFracDigitCount() const {
- return fSmallestInclusive == INT32_MIN ? INT32_MAX : -fSmallestInclusive;
- }
-
- /**
- * Returns the total number of digits that this interval spans.
- * Caution: If this interval spans all digits to the left or right of
- * decimal point instead of some fixed number, then what length()
- * returns is undefined.
- */
- int32_t length() const {
- return fLargestExclusive - fSmallestInclusive;
- }
-
- /**
- * If returns -3, the least significant digit in interval is the 10^-3
- * digit. Returns INT32_MIN if this interval spans all digits to right of
- * decimal point.
- */
- int32_t getLeastSignificantInclusive() const {
- return fSmallestInclusive;
- }
-private:
- int32_t fLargestExclusive;
- int32_t fSmallestInclusive;
-};
-
-U_NAMESPACE_END
-
-#endif // __DIGITINTERVAL_H__