数据类型(Java1.8版本)

public final class Boolean extends Object
implements Serializable, Comparable

字段属性:

static Boolean	FALSE
static Boolean	TRUE
static 类<Boolean>	TYPE

方法属性:

boolean booleanValue()
static int compare(boolean x, boolean y)
int compareTo(Boolean b)
boolean equals(Object obj)
static boolean getBoolean(String name)
int hashCode()
static int hashCode(boolean value)
static boolean logicalAnd(boolean a, boolean b)
	-- 返回将逻辑AND运算符应用于指定的 boolean操作数的结果。
static boolean logicalOr(boolean a, boolean b)
	-- 返回将逻辑OR运算符应用于指定的 boolean操作数的结果。
static boolean logicalXor(boolean a, boolean b)
	-- 返回将逻辑XOR运算符应用于指定的 boolean操作数的结果。
static boolean parseBoolean(String s)
String toString()
static String toString(boolean b)
static Boolean valueOf(boolean b)
static Boolean valueOf(String s)

public final class Byte extends Number implements Comparable

字段属性:

static int BYTES
static byte MAX_VALUE
static byte MIN_VALUE
static int SIZE
static 类<Byte> TYPE

方法属性:

byte byteValue()
static int compare(byte x, byte y)
int compareTo(Byte anotherByte)
static Byte decode(String nm)
double doubleValue()
boolean equals(Object obj)
float floatValue()
int hashCode()
static int hashCode(byte value)
int intValue()
long longValue()
static byte parseByte(String s)
static byte parseByte(String s, int radix)
short shortValue()
String toString()
static String toString(byte b)
static int toUnsignedInt(byte x)
static long toUnsignedLong(byte x)
static Byte valueOf(byte b)
static Byte valueOf(String s)
static Byte valueOf(String s, int radix)

public final class Double extends Number

字段属性:

static int BYTE			-- 用于表示 double值的字节数。
static int MAX_EXPONENT
static double MAX_VALUE
static int MIN_EXPONENT			-- 最小指数
static double MIN_NORMAL		-- 最小自然数
static double MIN_VALUE
static double NaN
static double NEGATIVE_INFINITY		-- 负无穷
static double POSITIVE_INFINITY			-- 正无穷
static int SIZE
static 类<Double> TYPE

方法属性:

byte byteValue()
static int compare(double d1, double d2)
int compareTo(Double anotherDouble)
static long doubleToLongBits(double value)
static long doubleToRawLongBits(double value)
double doubleValue()
boolean equals(Object obj)
float floatValue()
int hashCode()
static int hashCode(double value)
int intValue()
static boolean isFinite(double d)
boolean isInfinite()
static boolean isInfinite(double v)
boolean isNaN()
static boolean isNaN(double v)
static double longBitsToDouble(long bits)
long longValue()
static double max(double a, double b)
static double min(double a, double b)
static double parseDouble(String s)
short shortValue()
static double sum(double a, double b)
static String toHexString(double d)
String toString()
static String toString(double d)
static Double valueOf(double d)
static Double valueOf(String s)

public abstract class Enum<E extends Enum>
implements Comparable, Serializable

方法属性:

protected Object clone()
int compareTo(E o)
boolean equals(Object other)
protected void finalize()
类<E> getDeclaringClass()
int hashCode()
String name()
int ordinal()
String toString()
static <T extends Enum<T>>
T valueOf(类<T> enumType, String name)

public final class Float extends Number
implements Comparable

字段属性:

static int BYTES
static int MAX_EXPONENT
static float MAX_VALUE
static int MIN_EXPONENT
static float MIN_NORMAL
static float MIN_VALUE
static float Na
static float NEGATIVE_INFINITY
static float POSITIVE_INFINITY
static int SIZE
static 类<Float> TYPE

方法属性:

byte byteValue()
static int compare(float f1, float f2)
int compareTo(Float anotherFloat)
double doubleValue()
boolean equals(Object obj)
static int floatToIntBits(float value)
static int floatToRawIntBits(float value)
float floatValue()
int hashCode()
static int hashCode(float value)
static float intBitsToFloat(int bits)
int intValue()
static boolean isFinite(float f)
boolean isInfinite()
static boolean isInfinite(float v)
boolean isNaN()
static boolean isNaN(float v)
long longValue()
static float max(float a, float b)
static float min(float a, float b)
static float parseFloat(String s)
short shortValue()
static float sum(float a, float b)
static String toHexString(float f)
String toString()
static String toString(float f)
static Float valueOf(float f)
static Float valueOf(String s)

public final class Integer extends Number
implements Comparable

字段属性:

static int	BYTES
static int	MAX_VALUE
static int	MIN_VALUE
static int	SIZE
static 类<Integer>	TYPE

方法属性;

static int bitCount(int i)
byte byteValue()
static int compare(int x, int y)
int compareTo(Integer anotherInteger)
static int compareUnsigned(int x, int y)
static Integer decode(String nm)
static int divideUnsigned(int dividend, int divisor)
double doubleValue()
boolean equals(Object obj)
float floatValue()
static Integer getInteger(String nm)
static Integer getInteger(String nm, int val)
static Integer getInteger(String nm, Integer val)
int hashCode()
static int hashCode(int value)
static int highestOneBit(int i)
int intValue()
long longValue()
static int lowestOneBit(int i)
static int max(int a, int b)
static int min(int a, int b)
static int numberOfLeadingZeros(int i)
static int numberOfTrailingZeros(int i)
static int parseInt(String s)
static int parseInt(String s, int radix)
static int parseUnsignedInt(String s)
static int parseUnsignedInt(String s, int radix
static int remainderUnsigned(int dividend, int divisor)
static int reverse(int i)。
static int reverseBytes(int i)
static int rotateLeft(int i, int distance)
static int rotateRight(int i, int distance)
short shortValue()
static int signum(int i)
static int sum(int a, int b)
static String toBinaryString(int i)
static String toHexString(int i)
static String toOctalString(int i)
String toString()
static String toString(int i)
static String toString(int i, int radix)
static long toUnsignedLong(int x)
static String toUnsignedString(int i)
static String toUnsignedString(int i, int radix)
static Integer valueOf(int i)
static Integer valueOf(String s)
static Integer valueOf(String s, int radix)

public final class Long extends Number
implements Comparable

字段属性:

static int BYTES
static long MAX_VALUE
static long MIN_VALUE
static int SIZE
static 类<Long> TYPE

方法属性:

static int bitCount(long i)
byte byteValue()
static int compare(long x, long y)
int compareTo(Long anotherLong)
static int compareUnsigned(long x, long y)
static Long decode(String nm)
static long divideUnsigned(long dividend, long divisor)
double doubleValue()
boolean equals(Object obj)
float floatValue()
static Long getLong(String nm)
static Long getLong(String nm, long val)
static Long getLong(String nm, Long val)
int hashCode()
static int hashCode(long value)
static long highestOneBit(long i)
int intValue()
long longValue()
static long lowestOneBit(long i)
static long max(long a, long b)
static long min(long a, long b)
static int numberOfLeadingZeros(long i)
static int numberOfTrailingZeros(long i)
static long parseLong(String s)
static long parseLong(String s, int radix)
static long parseUnsignedLong(String s)
static long parseUnsignedLong(String s, int radix)
static long remainderUnsigned(long dividend, long divisor)
static long reverse(long i)
static long reverseBytes(long i)
static long rotateLeft(long i, int distance)
static long rotateRight(long i, int distance)
short shortValue()
static int signum(long i)
static long sum(long a, long b)
static String toBinaryString(long i)
static String toHexString(long i)
static String toOctalString(long i)
String toString()
static String toString(long i)
static String toString(long i, int radix)
static String toUnsignedString(long i)
static String toUnsignedString(long i, int radix)
static Long valueOf(long l)
static Long valueOf(String s)
static Long valueOf(String s, int radix)

public final class Math
public final class StrictMath – 两个类字段方法相同,就放一块了,但 StrictMath 在计算时,使用了各种网络算法

字段属性:

static double E
static double PI

方法属性:

static double abs(double a)			-- 绝对值。
static float abs(float a)
static int abs(int a)
static long abs(long a)
static double acos(double a)
	-- 返回值的反余弦值; 返回的角度在 0.0 到 pi 的范围内。
static int addExact(int x, int y)
	-- 返回其参数的总和,如果结果溢出 int,则抛出 int 。
static long addExact(long x, long y)
	-- 返回其参数的总和,如果结果溢出long,则抛出 long 。
static double asin(double a)
	-- 返回值的正弦值; 返回角度在pi / 2到pi / 2的范围内。
static double atan(double a)
	-- 返回值的反正切值; 返回角度在pi / 2到pi / 2的范围内。
static double atan2(double y, double x)
	-- 返回从直角坐标(转换角度 theta x , y )为极坐标 (R,θ-)。
static double cbrt(double a)
	-- 返回 double值的多维数据集根。
static double ceil(double a)
	-- 返回大于或等于参数的最小(最接近负无穷大) double值,等于一个数学整数。
static double copySign(double magnitude, double sign)
	-- 使用第二个浮点参数的符号返回第一个浮点参数。
static float copySign(float magnitude, float sign)
	-- 使用第二个浮点参数的符号返回第一个浮点参数。
static double cos(double a)
	-- 返回角度的三角余弦。
static double cosh(double x)
	-- 返回的双曲余弦 double值。
static int decrementExact(int a)
	-- 返回一个递减1的参数,如果结果溢出int,则 int 。
static long decrementExact(long a)
	-- 将返回的参数递减1,如果结果溢出long,则 long 。
static double exp(double a)
	-- 返回欧拉的数字 e提高到一个 double价值。
static double expm1(double x)
	-- 返回 e x -1。
static double floor(double a)
	-- 返回小于或等于参数的最大(最接近正无穷大) double值,等于一个数学整数。
static int floorDiv(int x, int y)
	-- 返回小于或等于代数商的最大(最接近正无穷大) int值。
static long floorDiv(long x, long y)
	-- 返回小于或等于代数商的最大(最接近正无穷大) long值。
static int floorMod(int x, int y)
	--返回 int参数的底部模数。
static long floorMod(long x, long y)
	-- 返回 long参数的底模数。
static int getExponent(double d)
	-- 返回a的表示中使用的无偏指数 double 。
static int getExponent(float f)
	-- 返回a的表示中使用的无偏指数 float 。
static double hypot(double x, double y)
	-- 返回sqrt( x 2 + y 2 ),没有中间溢出或下溢。
static double IEEEremainder(double f1, double f2)
	-- 根据IEEE 754标准计算两个参数的余数运算。
static int incrementExact(int a)
	-- 返回自变量1,如果结果溢出int,则 int 。
static long incrementExact(long a)
	-- 返回一个增加1的参数,如果结果溢出long,则 long 。
static double log(double a)
	-- 返回的自然对数(以 e为底) double值。
static double log10(double a)
	-- 返回一个 double的基数10对数值。
static double log1p(double x)
	-- 返回参数和1的和的自然对数。
static double max(double a, double b)
	-- 返回两个 double值中的较大值。
static float max(float a, float b)
	-- 返回两个 float的较大值。
static int max(int a, int b)
	-- 返回两个 int值中的较大值。
static long max(long a, long b)
	--- 返回两个 long的较大值。
static double min(double a, double b)
	-- 返回两个 double的较小值。
static float min(float a, float b)
	-- 返回两个 float的较小值。
static int min(int a, int b)
	-- 返回两个 int的较小值。
static long min(long a, long b)
	-- 返回两个 long的较小值。
static int multiplyExact(int x, int y)
	-- 返回参数的乘积,如果结果溢出int,则抛出 int 。
static long multiplyExact(long x, long y)
	-- 返回参数的乘积,如果结果溢出long,则抛出 long 。
static int negateExact(int a)
	-- 返回参数的否定,如果结果溢出int,则 int 。
static long negateExact(long a)
	-- 返回参数的否定,如果结果溢出long,则 long 。
static double nextAfter(double start, double direction)
	-- 返回与第二个参数方向相邻的第一个参数的浮点数。
static float nextAfter(float start, double direction)
	-- 返回与第二个参数方向相邻的第一个参数的浮点数。
static double nextDown(double d)
	-- 返回与负无穷大方向相邻的 d的浮点值。
static float nextDown(float f)
	-- 返回与负无穷大方向相邻的 f的浮点值。
static double nextUp(double d)
	--返回与正无穷大方向相邻的 d的浮点值。
static float nextUp(float f)
	-- 返回与正无穷大方向相邻的 f的浮点值。
static double pow(double a, double b)
	-- 将第一个参数的值返回到第二个参数的幂。
static double random()
	-- 返回值为 double值为正号,大于等于 0.0 ,小于 1.0 。
static double rint(double a)
	--- 返回与参数最接近值的 double值,并且等于数学整数。
static long round(double a)
	-- 返回参数中最接近的 long ,其中 long四舍五入为正无穷大。
static int round(float a)
	-- 返回参数中最接近的 int ,其中 int四舍五入为正无穷大。
static double scalb(double d, int scaleFactor)
	-- 返回 d 2 scaleFactor四舍五入,好像由单个正确四舍五入的浮点乘以双重值集合的成员执行。
static float scalb(float f, int scaleFactor)
	-- 返回 f 2 scaleFactor四舍五入,就像一个正确圆形的浮点数乘以浮点值集合的成员一样。
static double signum(double d)
	--- 返回参数的signum函数; 如果参数为零,则为零,如果参数大于零则为1.0,如果参数小于零,则为-1.0。
static float signum(float f)
	--- 返回参数的signum函数; 如果参数为零,则为零,如果参数大于零则为1.0f,如果参数小于零,则为-1.0f。
static double sin(double a)
	-- 返回角度的三角正弦。
static double sinh(double x)
	 -- 返回的双曲正弦 double值。
static double sqrt(double a)
	-- 返回的正确舍入正平方根 double值。
static int subtractExact(int x, int y)
	-- 返回参数的差异,如果结果溢出int,则抛出 int 。
static long subtractExact(long x, long y)
	--- 返回参数的差异,如果结果溢出long,则抛出 long 。
static double tan(double a)
	-- 返回角度的三角正切。
static double tanh(double x)
	-- 返回的双曲正切 double值。
static double toDegrees(double angrad)
	-- 将以弧度测量的角度转换为以度为单位的近似等效角度。
static int toIntExact(long value)
	-- 返回long参数的值; 如果值溢出int,则int 。
static double toRadians(double angdeg)
	-- 将以度为单位的角度转换为以弧度测量的大致相等的角度。
static double ulp(double d)
	-- 返回参数的ulp的大小。
static float ulp(float f)
	-- 返回参数的ulp的大小。

public abstract class Number implements Serializable

方法属性:

byte byteValue()		-- 舍入或截断
abstract double doubleValue()
abstract float floatValue()
abstract int intValue()
abstract long longValue()
short shortValue()

public final class Short extends Number implements Comparable

字段属性:

static in BYTES
static short MAX_VALUE
static short MIN_VALUE
static int SIZE
static 类<Short> TYPE

方法属性:

byte byteValue()
static int compare(short x, short y)
int compareTo(Short anotherShort)
static Short decode(String nm)
double doubleValue()
boolean equals(Object obj)
float floatValue()
int hashCode()
static int hashCode(short value)
int intValue()
long longValue()
static short parseShort(String s)
static short parseShort(String s, int radix
static short reverseBytes(short i)
short shortValue()
String toString()
static String toString(short s)
static int toUnsignedInt(short x
static long toUnsignedLong(short x)
static Short valueOf(short s)
static Short valueOf(String s)
static Short valueOf(String s, int radix)

public abstract class ClassValue

  • 将计算的值与(潜在地)每种类型相关联

方法属性:

protected abstract T computeValue(类<?> type)
	-- 计算给定类的派生值为 ClassValue 。
T get(类<?> type)		-- 返回给定类的值。
void remove(类<?> type)

示例:

ClassValue<Student> cv = new ClassValue<Student>() {
            @Override
            protected Student computeValue(Class<?> type) {
                return new Student();
            }
        };
        System.out.println(cv.get(Student.class));			//  返回 computeValue 里,returen 的值

由此,在使用 ClassValue 时,就必须重写 computeValue 方法。,而他们的作用似乎就在初始化某些类的时候,给定的初始化值,以及初始化可以进行其它操作。


public final class String implements Serializable, Comparable, CharSequence

字段属性:

static Comparator<String> CASE_INSENSITIVE_ORDER

方法属性:

char charAt(int index)
int codePointAt(int index)
int codePointBefore(int index)
int codePointCount(int beginIndex, int endIndex)
int compareTo(String anotherString)
int compareToIgnoreCase(String str)
String concat(String str)
boolean contains(CharSequence s)
boolean contentEquals(CharSequence cs)
boolean contentEquals(StringBuffer sb)
static String copyValueOf(char[] data)
static String copyValueOf(char[] data, int offset, int count)
boolean endsWith(String suffix)
boolean equals(Object anObject)
boolean equalsIgnoreCase(String anotherString)
static String format(Locale l, String format, Object... args)
static String format(String format, Object... args)
byte[] getBytes()
byte[] getBytes(Charset charset)
byte[] getBytes(String charsetName)
void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
int hashCode()
int indexOf(int ch)
int indexOf(int ch, int fromIndex)
int indexOf(String str)
int indexOf(String str, int fromIndex)
String intern()
boolean isEmpty()
static String join(CharSequence delimiter, CharSequence... elements)
static String join(CharSequence delimiter, Iterable<? extends CharSequence> elements)
int lastIndexOf(int ch)
int lastIndexOf(int ch, int fromIndex)
int lastIndexOf(String str)
int lastIndexOf(String str, int fromIndex)
int length()
boolean matches(String regex)
int offsetByCodePoints(int index, int codePointOffset)
boolean regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
boolean regionMatches(int toffset, String other, int ooffset, int len)
String replace(char oldChar, char newChar)
String replace(CharSequence target, CharSequence replacement)
String replaceAll(String regex, String replacement)
String replaceFirst(String regex, String replacement)
String[] split(String regex)
String[]	 split(String regex, int limit)
boolean startsWith(String prefix)
boolean startsWith(String prefix, int toffset)
CharSequence subSequence(int beginIndex, int endIndex)
String substring(int beginIndex)
String substring(int beginIndex, int endIndex)
char[] toCharArray()
String toLowerCase()
String toLowerCase(Locale locale)
String toString()
String toUpperCase()
String toUpperCase(Locale locale)
String trim()
static String valueOf(boolean b)
static String valueOf(char c)
static String valueOf(char[] data)
static String valueOf(char[] data, int offset, int count)
static String valueOf(double d)
static String valueOf(float f)
static String valueOf(int i)
static String valueOf(long l)
static String valueOf(Object obj)

public final class *StringBuffer implements Serializable, CharSequence

方法属性:

StringBuffer append(boolean b)
StringBuffer append(char c)
StringBuffer append(char[] str)
StringBuffer append(char[] str, int offset, int len)
StringBuffer append(CharSequence s)
StringBuffer append(CharSequence s, int start, int end)
StringBuffer append(double d)
StringBuffer append(float f)
StringBuffer append(int i)
StringBuffer append(long lng)
StringBuffer append(Object obj)
StringBuffer append(String str)
StringBuffer append(StringBuffer sb)
StringBuffer appendCodePoint(int codePoint)
int capacity()
char charAt(int index)
int codePointAt(int index)
int codePointBefore(int index)
int codePointCount(int beginIndex, int endIndex)
StringBuffer delete(int start, int end)
StringBuffer deleteCharAt(int index)
void ensureCapacity(int minimumCapacity)
void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
int indexOf(String str)
int indexOf(String str, int fromIndex)
StringBuffer insert(int offset, boolean b)
StringBuffer insert(int offset, char c)
StringBuffer insert(int offset, char[] str)
StringBuffer insert(int index, char[] str, int offset, int len)
StringBuffer insert(int dstOffset, CharSequence s)
StringBuffer insert(int dstOffset, CharSequence s, int start, int end)
StringBuffer insert(int offset, double d)
StringBuffer insert(int offset, float f)
StringBuffer insert(int offset, int i)
StringBuffer insert(int offset, long l)
StringBuffer insert(int offset, Object obj)
StringBuffer insert(int offset, String str)
int lastIndexOf(String str)
int lastIndexOf(String str, int fromIndex)
int length()
int offsetByCodePoints(int index, int codePointOffset)
StringBuffer replace(int start, int end, String str
StringBuffer reverse()
void setCharAt(int index, char ch)
void setLength(int newLength)
CharSequence subSequence(int start, int end)
String substring(int start)
String substring(int start, int end)
String toString()
void trimToSize()

  • 5
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值