本文整理汇总了Java中com.google.common.collect.ImmutableList.equals方法的典型用法代码示例。如果您正苦于以下问题:Java ImmutableList.equals方法的具体用法?Java ImmutableList.equals怎么用?Java ImmutableList.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.ImmutableList
的用法示例。
在下文中一共展示了ImmutableList.equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: invalidateCompetitorRanking
import com.google.common.collect.ImmutableList; //导入方法依赖的package包/类
/**
* Re-sort all {@link Competitor}s from scratch, according to the current {@link VictoryCondition}.
* This should be called when the state of the match changes in a way that affects the
* rank of any competitors.
*/
public void invalidateCompetitorRanking() {
final ImmutableList<Competitor> before = ImmutableList.copyOf(calculator().rankedCompetitors());
calculator().invalidateRanking();
final ImmutableList<Competitor> after = ImmutableList.copyOf(calculator().rankedCompetitors());
if(!before.equals(after)) {
eventBus.callEvent(new RankingsChangeEvent(match, before, after));
}
}
示例2: resolveIn
import com.google.common.collect.ImmutableList; //导入方法依赖的package包/类
public GenericMethodType<? extends T> resolveIn(TypeToken<?> context) {
final TypeToken<? extends T> returnType = (TypeToken<? extends T>) context.resolveType(this.returnType.getType());
final ImmutableList<TypeToken<?>> parameterTypes = this.parameterTypes.stream()
.map(t -> context.resolveType(t.getType()))
.collect(Collectors.toImmutableList());
return returnType.equals(this.returnType) && parameterTypes.equals(this.parameterTypes)
? this
: new GenericMethodType<>(returnType, parameterTypes);
}
示例3: equals
import com.google.common.collect.ImmutableList; //导入方法依赖的package包/类
private static boolean equals(ImmutableList<Object> expected, ImmutableList<Object> current) {
// System.out.println("eq: "+expected+" ? "+current);
return expected.equals(current);
}