本文整理了Java中com.google.android.exoplayer2.util.Util.compareLong()
方法的一些代码示例,展示了Util.compareLong()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.compareLong()
方法的具体详情如下:
包路径:com.google.android.exoplayer2.util.Util
类名称:Util
方法名:compareLong
[英]Compares two long values and returns the same value as Long.compare(long, long).
[中]比较两个long值并返回与long相同的值。比较(长,长)。
代码示例来源:origin: google/ExoPlayer
@Override
public int compareTo(@NonNull PendingMessage other) {
int res = Util.compareLong(this.when, other.when);
if (res == 0 && this != other) {
res = Util.compareLong(this.sequenceNumber, other.sequenceNumber);
}
return res;
}
}
代码示例来源:origin: google/ExoPlayer
@Override
public int compareTo(@NonNull Segment other) {
return Util.compareLong(startTimeUs, other.startTimeUs);
}
}
代码示例来源:origin: google/ExoPlayer
@Override
public int compareTo(@NonNull PendingMessageInfo other) {
if ((resolvedPeriodUid == null) != (other.resolvedPeriodUid == null)) {
// PendingMessageInfos with a resolved period position are always smaller.
return resolvedPeriodUid != null ? -1 : 1;
}
if (resolvedPeriodUid == null) {
// Don't sort message with unresolved positions.
return 0;
}
// Sort resolved media times by period index and then by period position.
int comparePeriodIndex = resolvedPeriodIndex - other.resolvedPeriodIndex;
if (comparePeriodIndex != 0) {
return comparePeriodIndex;
}
return Util.compareLong(resolvedPeriodTimeUs, other.resolvedPeriodTimeUs);
}
}
代码示例来源:origin: google/ExoPlayer
@Override
public int compareTo(@NonNull PendingMessage other) {
int res = Util.compareLong(this.when, other.when);
if (res == 0 && this != other) {
res = Util.compareLong(this.sequenceNumber, other.sequenceNumber);
}
return res;
}
}
内容来源于网络,如有侵权,请联系作者删除!