java.lang.Object
java.lang.Enum<BitCount>
xyz.cofe.num.BitCount
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BitCount>,java.lang.constant.Constable
public enum BitCount extends java.lang.Enum<BitCount>
Кол-во бит на число
-
Nested Class Summary
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description intbitsКол-во бит на число -
Method Summary
Modifier and Type Method Description static BitCountmax(java.lang.Number n1, java.lang.Number n2)Возвращает максимальное преблизительное кол-во бит для указанных чисел, если нет возможности определитьof(Number): есть хоть одно значение, то испольуеться оно если отсуствуют оба, то используется INTstatic BitCountof(java.lang.Number n)Возвращает приблизительное кол-во используемых бит для указанного числаstatic BitCountvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static BitCount[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Field Details
-
bits
public final int bitsКол-во бит на число
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
of
Возвращает приблизительное кол-во используемых бит для указанного числа- Parameters:
n- число- Returns:
- кол-во бит или null если не возможно определить
-
max
Возвращает максимальное преблизительное кол-во бит для указанных чисел, если нет возможности определитьof(Number):- есть хоть одно значение, то испольуеться оно
- если отсуствуют оба, то используется INT
- Parameters:
n1- числоn2- число- Returns:
- кол-во бит
-