ResultField.java
net.minecraft.util.profiling.ResultField
信息
- 全限定名:net.minecraft.util.profiling.ResultField
- 类型:public final class
- 包:net.minecraft.util.profiling
- 源码路径:src/main/java/net/minecraft/util/profiling/ResultField.java
- 起始行号:L3
- 实现:Comparable
- 职责:
TODO
字段/常量
-
percentage- 类型:
double - 修饰符:
public final - 源码定位:
L4 - 说明:
TODO
- 类型:
-
globalPercentage- 类型:
double - 修饰符:
public final - 源码定位:
L5 - 说明:
TODO
- 类型:
-
count- 类型:
long - 修饰符:
public final - 源码定位:
L6 - 说明:
TODO
- 类型:
-
name- 类型:
String - 修饰符:
public final - 源码定位:
L7 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public ResultField(String name, double percentage, double globalPercentage, long count) @ L9
- 构造器名:ResultField
- 源码定位:L9
- 修饰符:public
参数:
- name: String
- percentage: double
- globalPercentage: double
- count: long
说明:
TODO
方法
下面的方法块按源码顺序生成。
public int compareTo(ResultField resultField) @ L16
- 方法名:compareTo
- 源码定位:L16
- 返回类型:int
- 修饰符:public
参数:
- resultField: ResultField
说明:
TODO
public int getColor() @ L24
- 方法名:getColor
- 源码定位:L24
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
代码
public final class ResultField implements Comparable<ResultField> {
public final double percentage;
public final double globalPercentage;
public final long count;
public final String name;
public ResultField(String name, double percentage, double globalPercentage, long count) {
this.name = name;
this.percentage = percentage;
this.globalPercentage = globalPercentage;
this.count = count;
}
public int compareTo(ResultField resultField) {
if (resultField.percentage < this.percentage) {
return -1;
} else {
return resultField.percentage > this.percentage ? 1 : resultField.name.compareTo(this.name);
}
}
public int getColor() {
return (this.name.hashCode() & 11184810) + -12303292;
}
}引用的其他类
- 无