boolean (@Nullable E element, @NotNull ArrangementSettingsToken token) { if (element instanceof TypeAwareArrangementEntry) { Set<? extends ArrangementSettingsToken> types = ((TypeAwareArrangementEntry)element).getTypes(); return types.size() == 1 && token.equals(types.iterator().next()); } return false; }