@SuppressWarnings("unchecked") @Override @PublicEvolving public TypeComparator<T> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig) { if (isKeyType()) { @SuppressWarnings("rawtypes") GenericTypeComparator comparator = new GenericTypeComparator(sortOrderAscending, createSerializer(executionConfig), this.typeClass); return (TypeComparator<T>) comparator; } throw new UnsupportedOperationException("Types that do not implement java.lang.Comparable cannot be used as keys."); }
@SuppressWarnings("unchecked") @Override @PublicEvolving public TypeComparator<T> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig) { if (isKeyType()) { @SuppressWarnings("rawtypes") GenericTypeComparator comparator = new GenericTypeComparator(sortOrderAscending, createSerializer(executionConfig), this.typeClass); return (TypeComparator<T>) comparator; } throw new UnsupportedOperationException("Types that do not implement java.lang.Comparable cannot be used as keys."); }
@SuppressWarnings("unchecked") @Override @PublicEvolving public TypeComparator<T> createComparator(boolean sortOrderAscending, ExecutionConfig executionConfig) { if (isKeyType()) { @SuppressWarnings("rawtypes") GenericTypeComparator comparator = new GenericTypeComparator(sortOrderAscending, createSerializer(executionConfig), this.typeClass); return (TypeComparator<T>) comparator; } throw new UnsupportedOperationException("Types that do not implement java.lang.Comparable cannot be used as keys."); }