Java之常用类的认识

以下英文部分转载自java se 12 & jdk 12 doc,快速访问

String

构造器

第一种:空参数
第二种:以字节数组为参数
第三种:以字符数组为参数
第四种:以统一编码码点数组为参数
第五种:以双SB为参数

方法

静态方法:

返回值名称描述
static StringcopyValueOf​(char[] data)等同于valueOf(char[])
static StringcopyValueOf​(char[] data, int offset, int count)等同于valueOf(char[], int, int).
static Stringformat​(String format, Object… args)Returns a formatted string using the specified format string and arguments.返回一个使用指定的格式化字符串和参数格式化过的值。
static Stringformat​(Locale l, String format, Object… args)Returns a formatted string using the specified locale, format string, and arguments.返回一个使用指定的区域、格式化字符串和参数格式化过的值。
static Stringjoin​(CharSequence delimiter, CharSequence… elements)Returns a new String composed of copies of the CharSequence elements joined together with a copy of the specified delimiter.返回一个以指定分隔符分隔字符序列元素形式的新字符串。
static Stringjoin​(CharSequence delimiter, Iterable<? extends CharSequence> elements)Returns a new String composed of copies of the CharSequence elements joined together with a copy of the specified delimiter.同上。
static StringvalueOf​(boolean b)Returns the string representation of the boolean argument.返回布尔参数的字符串形式。
static StringvalueOf​(char c)Returns the string representation of the char argument.返回字符参数的字符串形式。
static StringvalueOf​(char[] data)Returns the string representation of the char array argument.返回字符数组参数的字符串形式。
static StringvalueOf​(char[] data, int offset, int count)Returns the string representation of a specific subarray of the char array argument.返回指定字符数组参数的子数组的字符串形式。
static StringvalueOf​(double d)Returns the string representation of the double argument.返回双精度浮点型参数的字符串形式。
static StringvalueOf​(float f)Returns the string representation of the float argument.返回浮点型参数的字符串形式。
static StringvalueOf​(int i)Returns the string representation of the int argument.返回整型参数的字符串形式。
static StringvalueOf​(long l)Returns the string representation of the long argument.返回长整型参数的字符串形式。
static StringvalueOf​(Object obj)Returns the string representation of the Object argument.返回对象参数的字符串形式。

实例方法:

返回值名称描述
charcharAt​(int index)Returns the char value at the specified index.返回指定序号的字符值。
IntStreamchars()Returns a stream of int zero-extending the char values from this sequence.返回从这个字符串获取零扩展字符值的int流。
intcodePointAt​(int index)Returns the character (Unicode code point) at the specified index.返回指定序号的(字符)码点。
intcodePointBefore​(int index)Returns the character (Unicode code point) before the specified index.返回指定序号之前的(字符)码点。
intcodePointCount​(int beginIndex, int endIndex)Returns the number of Unicode code points in the specified text range of this String.返回这个字符串中指定文本范围内的码点数。
IntStreamcodePoints()Returns a stream of code point values from this sequence.返回一个从这个序列得到码点值的流。
intcompareTo​(String anotherString)Compares two strings lexicographically.按字典顺序比较两个字符串大小。
intcompareToIgnoreCase​(String str)Compares two strings lexicographically, ignoring case differences.按字典顺序比较两个字符串大小,忽略大小写影响。
Stringconcat​(String str)Concatenates the specified string to the end of this string.连接指定字符串到该字符串末尾。
booleancontains​(CharSequence s)Returns true if and only if this string contains the specified sequence of char values.只有当该字符串包含指定字符值序列才返回“是”。
booleancontentEquals​(CharSequence cs)Compares this string to the specified CharSequence.比较该字符串是否与给定字符序列相等。
booleancontentEquals​(StringBuffer sb)Compares this string to the specified StringBuffer.比较该字符串是否与给定字符串缓存器内容相等。
OptionaldescribeConstable()Returns an Optional containing the nominal descriptor for this instance, which is the instance itself.返回一个包含为这个实例生成的名义上的描述符的Optional,这个Optional就是这个实例本身。
booleanendsWith​(String suffix)Tests if this string ends with the specified suffix.测试该字符串是否以指定后缀结尾。
booleanequals​(Object anObject)Compares this string to the specified object.比较该字符串与给定对象是否相等。
booleanequalsIgnoreCase​(String anotherString)Compares this String to another String, ignoring case considerations.比较该字符串是否与另一个字符串相等,忽略大小写。
byte[]getBytes()Encodes this String into a sequence of bytes using the platform’s default charset, storing the result into a new byte array.使用平台的默认字符集将该字符串编码成字节序列,并将结果存储到一个新的字节数组并返回。
byte[]getBytes​(String charsetName)Encodes this String into a sequence of bytes using the named charset, storing the result into a new byte array.使用给定名称的字符集将该字符串编码成字节序列,并将结果存储到一个新的字节数组并返回。
byte[]getBytes​(Charset charset)Encodes this String into a sequence of bytes using the given charset, storing the result into a new byte array.使用给定的字符集将该字符串编码成字节序列,并将结果存储到一个新的字节数组并返回。
voidgetChars​(int srcBegin, int srcEnd, char[] dst, int dstBegin)Copies characters from this string into the destination character array.从该字符串中复制字符到目标字符数组。
inthashCode()Returns a hash code for this string.返回该字符串的哈希码。
Stringindent​(int n)Adjusts the indentation of each line of this string based on the value of n, and normalizes line termination characters.根据n的值调整该字符串每行的缩进,并标准化行终止符。
intindexOf​(int ch)Returns the index within this string of the first occurrence of the specified character.返回该字符串内与给定字符第一次相遇的序号。
intindexOf​(int ch, int fromIndex)Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.返回该字符串内,从给定序号开始,与给定字符第一次相遇的序号。
intindexOf​(String str)Returns the index within this string of the first occurrence of the specified substring.返回该字符串内与给定子字符串第一次相遇的序号。
intindexOf​(String str, int fromIndex)Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.返回该字符串内,从给定序号开始,与给定子字符串第一次相遇的序号。
Stringintern()Returns a canonical representation for the string object.返回一个该字符串对象的规范化表达。
booleanisBlank()Returns true if the string is empty or contains only white space codepoints, otherwise false.如果该字符串是空的或者只包含白色空格码点就返回是,否则返回否。
booleanisEmpty()Returns true if, and only if, length() is 0.仅当该字符串长度为0才返回是,否则返回否。
intlastIndexOf​(int ch)Returns the index within this string of the last occurrence of the specified character.返回该字符串内与给定字符最后一次相遇的序号。
intlastIndexOf​(int ch, int fromIndex)Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index.返回该字符串内,从给定序号开始,与给定字符最后一次相遇的序号。
intlastIndexOf​(String str)Returns the index within this string of the last occurrence of the specified substring.返回该字符串内与给定字符串最后一次相遇的序号。
intlastIndexOf​(String str, int fromIndex)Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the specified index.返回该字符串内,从给定序号开始,与给定字符串最后一次相遇的序号。
intlength()Returns the length of this string.返回该字符串的长度。
Streamlines()Returns a stream of lines extracted from this string, separated by line terminators.返回一个从该字符串提取的行的流,并以行终止符分隔。
booleanmatches​(String regex)Tells whether or not this string matches the given regular expression.判断该字符串是否符合给定的正则表达式。
intoffsetByCodePoints​(int index, int codePointOffset)Returns the index within this String that is offset from the given index by codePointOffset code points.返回与给定序号距离codePointOffset值的序号。
booleanregionMatches​(boolean ignoreCase, int toffset, String other, int ooffset, int len)Tests if two string regions are equal.判断2个字符串区域是否相等。
booleanregionMatches​(int toffset, String other, int ooffset, int len)Tests if two string regions are equal.同上。
Stringrepeat​(int count)Returns a string whose value is the concatenation of this string repeated count times.返回一个由该字符串重复多次串联起来的新字符串。
Stringreplace​(char oldChar, char newChar)Returns a string resulting from replacing all occurrences of oldChar in this string with newChar.返回一个在该字符串中用新字符替代所有旧字符的新字符串。
Stringreplace​(CharSequence target, CharSequence replacement)Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence.返回一个用给定的字符串替代该字符串中所有与目标字符串字面上相等的字符串的新字符串。
StringreplaceAll​(String regex, String replacement)Replaces each substring of this string that matches the given regular expression with the given replacement.返回一个用给定的替代字符串替换所有满足给定的正则的新字符串。
StringreplaceFirst​(String regex, String replacement)Replaces the first substring of this string that matches the given regular expression with the given replacement.返回一个用给定的替代字符串替换第一个满足给定的正则的新字符串。
StringresolveConstantDesc​(MethodHandles.Lookup lookup)Resolves this instance as a ConstantDesc, the result of which is the instance itself.解决该实例的常量描述,实例本身的结果?
String[]split​(String regex)Splits this string around matches of the given regular expression.用给定的正则拆分该字符串。
String[]split​(String regex, int limit)Splits this string around matches of the given regular expression.同上。
booleanstartsWith​(String prefix)Tests if this string starts with the specified prefix.判断该字符串是否以指定前缀开头。
booleanstartsWith​(String prefix, int toffset)Tests if the substring of this string beginning at the specified index starts with the specified prefix.判断该字符串在指定序号开始的子字符串是否以指定前缀开头。
Stringstrip()Returns a string whose value is this string, with all leading and trailing white space removed.返回一个字符串的值是去掉头尾所有空格的字符串。
StringstripLeading()Returns a string whose value is this string, with all leading white space removed.返回一个字符串的值是去掉开头所有空格的字符串。
StringstripTrailing()Returns a string whose value is this string, with all trailing white space removed.返回一个字符串的值是去掉结尾所有空格的字符串。
CharSequencesubSequence​(int beginIndex, int endIndex)Returns a character sequence that is a subsequence of this sequence.返回指定位置的子序列。
Stringsubstring​(int beginIndex)Returns a string that is a substring of this string.返回指定开头的子字符串。
Stringsubstring​(int beginIndex, int endIndex)Returns a string that is a substring of this string.返回指定位置的字符串。
char[]toCharArray()Converts this string to a new character array.变换该字符串到新的字符数组。
StringtoLowerCase()Converts all of the characters in this String to lower case using the rules of the default locale.根据默认时区的规则转变所有字符到小写。
StringtoLowerCase​(Locale locale)Converts all of the characters in this String to lower case using the rules of the given Locale.根据给定的时区的规则转变所有字符到小写。
StringtoString()This object (which is already a string!)返回该字符串本身的值。
StringtoUpperCase()Converts all of the characters in this String to upper case using the rules of the default locale.根据默认时区的规则转变所有字符到大写。
StringtoUpperCase​(Locale locale)Converts all of the characters in this String to upper case using the rules of the given Locale.根据给定的时区的规则转变所有字符到大写。
Rtransform​(Function<? super String,​? extends R> f)This method allows the application of a function to this string.该方法允许func应用到该字符串。
Stringtrim()Returns a string whose value is this string, with all leading and trailing space removed, where space is defined as any character whose codepoint is less than or equal to ‘U+0020’ (the space character).返回一个字符串的值是所有头尾去掉空格,且空格被定义为是码点小于或等于“U+0020”(空格字符)的任何字符。

Math

成员

修饰和类型成员描述
static doubleEThe double value that is closer than any other to e, the base of the natural logarithms.比其他都更接近e的double值,自然对数的基础。
static doublePIThe double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.比其他更接近pi的double值,圆周率到直径。

方法

静态方法

修饰和类型方法描述
static doubleabs​(double a)Returns the absolute value of a double value.返回一个double值的绝对值。
static floatabs​(float a)Returns the absolute value of a float value.返回一个float值的绝对值。
static intabs​(int a)Returns the absolute value of an int value.返回一个int值的绝对值。
static longabs​(long a)Returns the absolute value of a long value.返回一个long值的绝对值。
static doubleacos​(double a)Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi.返回一个值的弧余弦,返回的角度范围是0-pi。
static intaddExact​(int x, int y)Returns the sum of its arguments, throwing an exception if the result overflows an int.返回参数的和,如果结果溢出int范围就抛出一个异常。
static longaddExact​(long x, long y)Returns the sum of its arguments, throwing an exception if the result overflows a long.返回参数的和,如果结果溢出long范围就抛出一个异常。
static doubleasin​(double a)Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2.返回一个值的弧正弦,返回的角度范围是-pi/2 - pi/2。
static doubleatan​(double a)Returns the arc tangent of a value; the returned angle is in the range -pi/2 through pi/2.返回一个值的弧正切,返回的角度范围是-pi/2 - pi/2。
static doubleatan2​(double y, double x)Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).返回从长方形坐标(x,y)到相对的坐标(r,西塔)转变的角度。
static doublecbrt​(double a)Returns the cube root of a double value.返回一个double值的立方根。
static doubleceil​(double a)Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer.返回比参数值更大或者相等的最小的(最接近负无穷)double值,且等于一个数学上的整型。
static doublecopySign​(double magnitude, double sign)Returns the first floating-point argument with the sign of the second floating-point argument.使用第二个浮点参数的标志返回第一个浮点参数。
static floatcopySign​(float magnitude, float sign)Returns the first floating-point argument with the sign of the second floating-point argument.同上。
static doublecos​(double a)Returns the trigonometric cosine of an angle.返回一个角度的三角函数cos。
static doublecosh​(double x)Returns the hyperbolic cosine of a double value.返回一个double值的双曲线cos。
static intdecrementExact​(int a)Returns the argument decremented by one, throwing an exception if the result overflows an int.返回参数减一的值,如果该结果溢出int范围就抛出一个异常。
static longdecrementExact​(long a)Returns the argument decremented by one, throwing an exception if the result overflows a long.同上。
static doubleexp​(double a)Returns Euler’s number e raised to the power of a double value.返回欧拉的数量e提高一个double值的能力。
static doubleexpm1​(double x)Returns ex -1.返回ex -1。
static doublefloor​(double a)Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer.返回小于或等于参数并且等于一个数学上的整数的最大(接近正无穷)double值。
static intfloorDiv​(int x, int y)Returns the largest (closest to positive infinity) int value that is less than or equal to the algebraic quotient.返回小于或等于代数商的最大(接近正无穷)int值。
static longfloorDiv​(long x, int y)Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.同上。
static longfloorDiv​(long x, long y)Returns the largest (closest to positive infinity) long value that is less than or equal to the algebraic quotient.同上。
static intfloorMod​(int x, int y)Returns the floor modulus of the int arguments.返回两个int参数的求模。
static intfloorMod​(long x, int y)Returns the floor modulus of the long and int arguments.同上。
static longfloorMod​(long x, long y)Returns the floor modulus of the long arguments.同上。
static doublefma​(double a, double b, double c)Returns the fused multiply add of the three arguments; that is, returns the exact product of the first two arguments summed with the third argument and then rounded once to the nearest double.返回三个参数的带保险的乘加;也就是,返回第一个2个参数的准确乘积与第三个参数的和,然后四舍五入到最近的double值。
static floatfma​(float a, float b, float c)Returns the fused multiply add of the three arguments; that is, returns the exact product of the first two arguments summed with the third argument and then rounded once to the nearest float.同上。
static intgetExponent​(double d)Returns the unbiased exponent used in the representation of a double.返回用在double表达的公正的指数。
static intgetExponent​(float f)Returns the unbiased exponent used in the representation of a float.同上。
static doublehypot​(double x, double y)Returns sqrt(x2 +y2) without intermediate overflow or underflow.返回没有中间的溢出或下溢的开根号(x2+y2).
static doubleIEEEremainder​(double f1, double f2)Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.按照 IEEE 754 标准的规定,对两个参数进行余数运算。
static intincrementExact​(int a)Returns the argument incremented by one, throwing an exception if the result overflows an int.返回参数加1,如果结果溢出int范围就抛出一个异常。
static longincrementExact​(long a)Returns the argument incremented by one, throwing an exception if the result overflows a long.同上。
static doublelog​(double a)Returns the natural logarithm (base e) of a double value.返回一个double值的自然对数(以e为底)。
static doublelog10​(double a)Returns the base 10 logarithm of a double value.返回一个double值的以10为底对数。
static doublelog1p​(double x)Returns the natural logarithm of the sum of the argument and 1.返回参数和1的和的自然对数。
static doublemax​(double a, double b)Returns the greater of two double values.返回2个double值的更大者。
static floatmax​(float a, float b)Returns the greater of two float values.同上。
static intmax​(int a, int b)Returns the greater of two int values.同上。
static longmax​(long a, long b)Returns the greater of two long values.同上。
static doublemin​(double a, double b)Returns the smaller of two double values.返回2个double值的更小者。
static floatmin​(float a, float b)Returns the smaller of two float values.同上。
static intmin​(int a, int b)Returns the smaller of two int values.同上。
static longmin​(long a, long b)Returns the smaller of two long values.同上。
static intmultiplyExact​(int x, int y)Returns the product of the arguments, throwing an exception if the result overflows an int.返回参数的乘积,溢出范围抛出异常。
static longmultiplyExact​(long x, int y)Returns the product of the arguments, throwing an exception if the result overflows a long.同上。
static longmultiplyExact​(long x, long y)Returns the product of the arguments, throwing an exception if the result overflows a long.同上。
static longmultiplyFull​(int x, int y)Returns the exact mathematical product of the arguments.返回参数乘的准确数学上的结果。
static longmultiplyHigh​(long x, long y)Returns as a long the most significant 64 bits of the 128-bit product of two 64-bit factors.返回长度是两个64位参数的128位乘积的最高有效64位。
static intnegateExact​(int a)Returns the negation of the argument, throwing an exception if the result overflows an int.返回参数的取反值,溢出范围就抛出异常。
static longnegateExact​(long a)Returns the negation of the argument, throwing an exception if the result overflows a long.同上。
static doublenextAfter​(double start, double direction)Returns the floating-point number adjacent to the first argument in the direction of the second argument.返回相邻于第一个参数在第二个参数的方向的浮点数。
static floatnextAfter​(float start, double direction)Returns the floating-point number adjacent to the first argument in the direction of the second argument.同上。
static doublenextDown​(double d)Returns the floating-point value adjacent to d in the direction of negative infinity.返回相邻于参数在负无穷方向上的浮点值。
static floatnextDown​(float f)Returns the floating-point value adjacent to f in the direction of negative infinity.同上。
static doublenextUp​(double d)Returns the floating-point value adjacent to d in the direction of positive infinity.返回相邻于参数在正无穷方向上的浮点值。
static floatnextUp​(float f)Returns the floating-point value adjacent to f in the direction of positive infinity.同上。
static doublepow​(double a, double b)Returns the value of the first argument raised to the power of the second argument.返回第一个参数的第二个参数次方的值。
static doublerandom()Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.返回一个大于或等于0且小于1.0的正值。
static doublerint​(double a)Returns the double value that is closest in value to the argument and is equal to a mathematical integer.返回一个最靠近参数且等于一个数学上的整数的double值。简称四舍五入,但当参数为x.5时,取最近的偶数值。
static longround​(double a)Returns the closest long to the argument, with ties rounding to positive infinity.返回到参数最近的long型值,四舍五入到正无穷。
static intround​(float a)Returns the closest int to the argument, with ties rounding to positive infinity.同上。
static doublescalb​(double d, int scaleFactor)Returns d × 2scaleFactor rounded as if performed by a single correctly rounded floating-point multiply to a member of the double value set.返回已四舍五入的d乘以2的scaleFactor值的次方犹如一个单个的正确地四舍五入的浮点乘以double值集的一个成员。
static floatscalb​(float f, int scaleFactor)Returns f × 2scaleFactor rounded as if performed by a single correctly rounded floating-point multiply to a member of the float value set.同上。
static doublesignum​(double d)Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.返回参数的符号函数;如果参数是0则返回0,如果参数大于0则返回1.0,如果参数小于0则返回-1.0。
static floatsignum​(float f)Returns the signum function of the argument; zero if the argument is zero, 1.0f if the argument is greater than zero, -1.0f if the argument is less than zero.同上。
static doublesin​(double a)Returns the trigonometric sine of an angle.返回一个角度的三角函数正弦。
static doublesinh​(double x)Returns the hyperbolic sine of a double value.返回一个double值的双曲线正弦。
static doublesqrt​(double a)Returns the correctly rounded positive square root of a double value.返回一个double值的准确地四舍五入的正平方根。
static intsubtractExact​(int x, int y)Returns the difference of the arguments, throwing an exception if the result overflows an int.返回参数的差,结果溢出范围则抛出异常。
static longsubtractExact​(long x, long y)Returns the difference of the arguments, throwing an exception if the result overflows a long.同上。
static doubletan​(double a)Returns the trigonometric tangent of an angle.返回一个角度的三角函数正切。
static doubletanh​(double x)Returns the hyperbolic tangent of a double value.返回一个double值的双曲线正切。
static doubletoDegrees​(double angrad)Converts an angle measured in radians to an approximately equivalent angle measured in degrees.将一个角度从弧度转换到角度。
static inttoIntExact​(long value)Returns the value of the long argument; throwing an exception if the value overflows an int.返回long参数的值,溢出抛出异常。
static doubletoRadians​(double angdeg)Converts an angle measured in degrees to an approximately equivalent angle measured in radians.将一个角度从角度转换到弧度。
static doubleulp​(double d)Returns the size of an ulp of the argument.返回参数的ulp大小。 double值的ulp是该浮点值与下一个数值较大double值之间的正距离。
static floatulp​(float f)Returns the size of an ulp of the argument.同上。

Calendar

内部类

修饰和类型描述
static classCalendar.BuilderCalendar.Builder is used for creating a Calendar from various date-time parameters.被用于从各种日期时间的参数创建一个日历对象。

字段

修饰和类型字段描述
static intALL_STYLESA style specifier for getDisplayNames indicating names in all styles, such as “January” and “Jan”.一个getDisplayNames方法的样式指示符表示所有样式的名称,例如。
static intAMValue of the AM_PM field indicating the period of the day from midnight to just before noon.字段AM_PM的值,表示一天中从午夜到正午前的时间。
static intAM_PMField number for get and set indicating whether the HOUR is before or after noon.可获取或设置的字段数目表示小时是否在正午前或后。
static intAPRILValue of the MONTH field indicating the fourth month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第四个月。
protected booleanareFieldsSetTrue if fields[] are in sync with the currently set time.如果字段数组与当前设置时间同步,则返回是。
static intAUGUSTValue of the MONTH field indicating the eighth month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第八个月。
static intDATEField number for get and set indicating the day of the month.可设置或获取的字段值表示月的某一天。
static intDAY_OF_MONTHField number for get and set indicating the day of the month.同上。
static intDAY_OF_WEEKField number for get and set indicating the day of the week.周的某一天。
static intDAY_OF_WEEK_IN_MONTHField number for get and set indicating the ordinal number of the day of the week within the current month.在当前月内,周的某一天的有序数字。
static intDAY_OF_YEARField number for get and set indicating the day number within the current year.在当前年内的天数。
static intDECEMBERValue of the MONTH field indicating the twelfth month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第12个月。
static intDST_OFFSETField number for get and set indicating the daylight saving offset in milliseconds.以毫秒为单位指示夏令时的偏移量。
static intERAField number for get and set indicating the era, e.g., AD or BC in the Julian calendar.字段数字表示时代,例如儒略历的公元或公元前。
static intFEBRUARYValue of the MONTH field indicating the second month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第2个月。
static intFIELD_COUNTThe number of distinct fields recognized by get and set.具有get和set方法的特殊字段的数量。
protected int[]fieldsThe calendar field values for the currently set time for this calendar.为该日历的当前设置时间准备的日历字段值。
static intFRIDAYValue of the DAY_OF_WEEK field indicating Friday.字段DAY_OF_WEEK的值,表示周五。
static intHOURField number for get and set indicating the hour of the morning or afternoon.字段数值表示上午或下午的小时(12小时制)。
static intHOUR_OF_DAYField number for get and set indicating the hour of the day.表示一天的某个小时。
protected boolean[]isSetThe flags which tell if a specified calendar field for the calendar is set.该标志可判断是否特定的日期字段被设置值。
protected booleanisTimeSetTrue if then the value of time is valid.如果时间值有效则返回是。
static intJANUARYValue of the MONTH field indicating the first month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第1个月。
static intJULYValue of the MONTH field indicating the seventh month of the year in the Gregorian and Julian calendars.同上。
static intJUNEValue of the MONTH field indicating the sixth month of the year in the Gregorian and Julian calendars.同上。
static intLONGA style specifier for getDisplayName and getDisplayNames equivalent to LONG_FORMAT.一个 getDisplayName and getDisplayNames 方法的样式指示符,相当于LONG_FORMAT。
static intLONG_FORMATA style specifier for getDisplayName and getDisplayNames indicating a long name used for format.一个 getDisplayName and getDisplayNames 方法的样式指示符,表示长格式的名字。
static intLONG_STANDALONEA style specifier for getDisplayName and getDisplayNames indicating a long name used independently, such as a month name as calendar headers.一个 getDisplayName and getDisplayNames 方法的样式指示符,表示一个长的名字独立使用,例如一个月份名字作为日历头。
static intMARCHValue of the MONTH field indicating the third month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第3个月。
static intMAYValue of the MONTH field indicating the fifth month of the year in the Gregorian and Julian calendars.同上。
static intMILLISECONDField number for get and set indicating the millisecond within the second.字段数字表示在秒内的毫秒。
static intMINUTEField number for get and set indicating the minute within the hour.表示小时内的分钟。
static intMONDAYValue of the DAY_OF_WEEK field indicating Monday.字段DAY_OF_WEEK的值表示周一。
static intMONTHField number for get and set indicating the month.代表月份。
static intNARROW_FORMATA style specifier for getDisplayName and getDisplayNames indicating a narrow name used for format.一个 getDisplayName and getDisplayNames 方法的样式指示符,表示使用窄格式的名字。
static intNARROW_STANDALONEA style specifier for getDisplayName and getDisplayNames indicating a narrow name independently.表示独立地使用窄格式的名字。
static intNOVEMBERValue of the MONTH field indicating the eleventh month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第11个月。
static intOCTOBERValue of the MONTH field indicating the tenth month of the year in the Gregorian and Julian calendars.同上。
static intPMValue of the AM_PM field indicating the period of the day from noon to just before midnight.字段AM_PM的值,表示一天中从正午到午夜前的时间。
static intSATURDAYValue of the DAY_OF_WEEK field indicating Saturday.字段DAY_OF_WEEK的值表示周六。
static intSECONDField number for get and set indicating the second within the minute.表示分钟内的秒。
static intSEPTEMBERValue of the MONTH field indicating the ninth month of the year in the Gregorian and Julian calendars.字段MONTH的值,表示公历和儒略历中一年的第9个月。
static intSHORTA style specifier for getDisplayName and getDisplayNames equivalent to SHORT_FORMAT.一个 getDisplayName and getDisplayNames 方法的样式指示符,相当于短格式标识符。
static intSHORT_FORMATA style specifier for getDisplayName and getDisplayNames indicating a short name used for format.一个 getDisplayName and getDisplayNames 方法的样式指示符,表示使用短名字格式。
static intSHORT_STANDALONEA style specifier for getDisplayName and getDisplayNames indicating a short name used independently, such as a month abbreviation as calendar headers.一个 getDisplayName and getDisplayNames 方法的样式指示符,表示独立地使用短名字,例如一个月份的缩写作为日历头。
static intSUNDAYValue of the DAY_OF_WEEK field indicating Sunday.字段DAY_OF_WEEK的值表示周日。
static intTHURSDAYValue of the DAY_OF_WEEK field indicating Thursday.同上。
protected longtimeThe currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.当前为该日历设置的时间,用毫秒表示在1970年1月1日后的时间。
static intTUESDAYValue of the DAY_OF_WEEK field indicating Tuesday.字段DAY_OF_WEEK的值表示周二。
static intUNDECIMBERValue of the MONTH field indicating the thirteenth month of the year.字段MONTH的值表示年的第13个月。
static intWEDNESDAYValue of the DAY_OF_WEEK field indicating Wednesday.字段DAY_OF_WEEK的值表示周三。
static intWEEK_OF_MONTHField number for get and set indicating the week number within the current month.字段数字表示在当月的周数。
static intWEEK_OF_YEARField number for get and set indicating the week number within the current year.表示当年的周数。
static intYEARField number for get and set indicating the year.表示年份。
static intZONE_OFFSETField number for get and set indicating the raw offset from GMT in milliseconds.字段数字表示用毫秒表示从GMT的偏移量。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值