本文整理匯總了Java中org.apache.flink.api.common.typeutils.base.StringComparator類的典型用法代碼示例。如果您正苦於以下問題:Java StringComparator類的具體用法?Java StringComparator怎麽用?Java StringComparator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StringComparator類屬於org.apache.flink.api.common.typeutils.base包,在下文中一共展示了StringComparator類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
protected TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>> createComparator(
boolean ascending) {
return new TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>>(
new int[] { 0 },
new TypeComparator[] {
new TupleComparator<Tuple2<String, Double>>(
new int[] { 0, 1 },
new TypeComparator[] {
new StringComparator(ascending),
new DoubleComparator(ascending) },
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }) },
new TypeSerializer[] {
new TupleSerializer<Tuple2<String, Double>>(
(Class<Tuple2<String, Double>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Long, Long>>(
(Class<Tuple2<Long, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Integer, Long>>(
(Class<Tuple2<Integer, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) });
}
示例2: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
protected TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>> createComparator(
boolean ascending) {
return new TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>>(
new int[] { 0, 2 },
new TypeComparator[] {
new TupleComparator<Tuple2<String, Double>>(
new int[] { 0, 1 },
new TypeComparator[] {
new StringComparator(ascending),
new DoubleComparator(ascending) },
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleComparator<Tuple2<Integer, Long>>(
new int[] { 0, 1 },
new TypeComparator[] {
new IntComparator(ascending),
new LongComparator(ascending) },
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) },
new TypeSerializer[] {
new TupleSerializer<Tuple2<String, Double>>(
(Class<Tuple2<String, Double>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Long, Long>>(
(Class<Tuple2<Long, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Integer, Long>>(
(Class<Tuple2<Integer, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) });
}
示例3: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@Override
protected TupleComparator<Tuple3<Integer, String, Double>> createComparator(boolean ascending) {
return new TupleComparator<Tuple3<Integer, String, Double>>(
new int[]{0, 1},
new TypeComparator[]{
new IntComparator(ascending),
new StringComparator(ascending)
},
new TypeSerializer[]{ IntSerializer.INSTANCE, StringSerializer.INSTANCE, DoubleSerializer.INSTANCE });
}
示例4: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@Override
protected TupleComparator<Tuple3<Integer, String, Double>> createComparator(boolean ascending) {
return new TupleComparator<Tuple3<Integer, String, Double>>(
new int[]{0, 1, 2},
new TypeComparator[]{
new IntComparator(ascending),
new StringComparator(ascending),
new DoubleComparator(ascending)
},
new TypeSerializer[]{ IntSerializer.INSTANCE, StringSerializer.INSTANCE, DoubleSerializer.INSTANCE });
}
示例5: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
protected TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>> createComparator(
boolean ascending) {
return new TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>>(
new int[] { 0, 1, 2 },
new TypeComparator[] {
new TupleComparator<Tuple2<String, Double>>(
new int[] { 0, 1 },
new TypeComparator[] {
new StringComparator(ascending),
new DoubleComparator(ascending) },
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleComparator<Tuple2<Long, Long>>(
new int[] { 0, 1 },
new TypeComparator[] {
new LongComparator(ascending),
new LongComparator(ascending) },
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleComparator<Tuple2<Integer, Long>>(
new int[] { 0, 1 },
new TypeComparator[] {
new IntComparator(ascending),
new LongComparator(ascending) },
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) },
new TypeSerializer[] {
new TupleSerializer<Tuple2<String, Double>>(
(Class<Tuple2<String, Double>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Long, Long>>(
(Class<Tuple2<Long, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Integer, Long>>(
(Class<Tuple2<Integer, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) });
}
示例6: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@Override
protected TypeComparator<String> createComparator(boolean ascending) {
return new StringComparator(ascending);
}
示例7: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
protected TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>> createComparator(
boolean ascending) {
return new TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>>(
new int[] { 0 },
new TypeComparator[] {
new TupleComparator<Tuple2<String, Double>>(
new int[] { 0, 1 },
new TypeComparator[] {
new StringComparator(ascending),
new DoubleComparator(ascending) },
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleComparator<Tuple2<Long, Long>>(
new int[] { 0, 1 },
new TypeComparator[] {
new LongComparator(ascending),
new LongComparator(ascending) },
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleComparator<Tuple2<Integer, Long>>(
new int[] { 0, 1 },
new TypeComparator[] {
new IntComparator(ascending),
new LongComparator(ascending) },
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) },
new TypeSerializer[] {
new TupleSerializer<Tuple2<String, Double>>(
(Class<Tuple2<String, Double>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Long, Long>>(
(Class<Tuple2<Long, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Integer, Long>>(
(Class<Tuple2<Integer, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) });
}
示例8: createComparator
import org.apache.flink.api.common.typeutils.base.StringComparator; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
protected TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>> createComparator(
boolean ascending) {
return new TupleComparator<Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>>>(
new int[] { 0, 2 },
new TypeComparator[] {
new TupleComparator<Tuple2<String, Double>>(
new int[] { 0, 1 },
new TypeComparator[] {
new StringComparator(ascending),
new DoubleComparator(ascending) },
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleComparator<Tuple2<Long, Long>>(
new int[] { 0, 1 },
new TypeComparator[] {
new LongComparator(ascending),
new LongComparator(ascending) },
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleComparator<Tuple2<Integer, Long>>(
new int[] { 0, 1 },
new TypeComparator[] {
new IntComparator(ascending),
new LongComparator(ascending) },
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) },
new TypeSerializer[] {
new TupleSerializer<Tuple2<String, Double>>(
(Class<Tuple2<String, Double>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
StringSerializer.INSTANCE,
DoubleSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Long, Long>>(
(Class<Tuple2<Long, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
LongSerializer.INSTANCE,
LongSerializer.INSTANCE }),
new TupleSerializer<Tuple2<Integer, Long>>(
(Class<Tuple2<Integer, Long>>) (Class<?>) Tuple2.class,
new TypeSerializer[] {
IntSerializer.INSTANCE,
LongSerializer.INSTANCE }) });
}