List of usage examples for com.google.common.collect ImmutableSortedMultiset copyOf
public static <E> ImmutableSortedMultiset<E> copyOf(Iterator<? extends E> elements)
From source file:org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc.java
@Override public String getExprString(boolean sortChildren) { if (sortChildren) { UDFType udfType = genericUDF.getClass().getAnnotation(UDFType.class); if (udfType.commutative()) { // Get the sorted children expr strings String[] childrenExprStrings = new String[chidren.size()]; for (int i = 0; i < childrenExprStrings.length; i++) { childrenExprStrings[i] = chidren.get(i).getExprString(); }/*from w w w. java2 s . co m*/ return genericUDF.getDisplayString(ImmutableSortedMultiset.copyOf(childrenExprStrings) .toArray(new String[childrenExprStrings.length])); } } return getExprString(); }