本文整理匯總了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);
}