以 conjunction 为分隔符将数组转换为字符串

@param array 数组
@param conjunction 分隔符
@return 连接后的字符串
503419
public static String join(long[] array, CharSequence conjunction) {
		if (null == array) {
			return null;
		}

		final StringBuilder sb = new StringBuilder();
		boolean isFirst = true;
		for (long item : array) {
			if (isFirst) {
				isFirst = false;
			} else {
				sb.append(conjunction);
			}
			sb.append(item);
		}
		return sb.toString();
	}
444682
public static <T> String join(Iterator<T> iterator, CharSequence conjunction) {
		return IterUtil.join(iterator, conjunction);
	}
746331
private static ICondition[] toConditions( JsonArray array)
    {
    return
      IntStream.range( 0, array.size())
      .mapToObj( i -> asCondition( array.getJsonObject( i)))
      .collect( toList())
      .toArray( new ICondition[0]);
    }
1130330
public static IConjunct negate( IConjunct conjunct)
    {
    AnyOf anyOf = new AnyOf();
    for( Iterator<IDisjunct> disjuncts = conjunct.getDisjuncts();
           disjuncts.hasNext();)
        {
        Conjunction conjunction = new Conjunction();
        for( Iterator<IAssertion> assertions = disjuncts.next().getAssertions();
             assertions.hasNext();)
          {
          conjunction.add( assertions.next().negate());
          }

        anyOf.add( simplify( conjunction));
        }
    
    return Cnf.convert( anyOf);
    }
490709
public final void ruleConjunction() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:658:2: ( ( ( rule__Conjunction__Group__0 ) ) )
            // InternalXtext.g:659:2: ( ( rule__Conjunction__Group__0 ) )
            {
            // InternalXtext.g:659:2: ( ( rule__Conjunction__Group__0 ) )
            // InternalXtext.g:660:3: ( rule__Conjunction__Group__0 )
            {
             before(grammarAccess.getConjunctionAccess().getGroup()); 
            // InternalXtext.g:661:3: ( rule__Conjunction__Group__0 )
            // InternalXtext.g:661:4: rule__Conjunction__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__Conjunction__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getConjunctionAccess().getGroup()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
242805
@Nonnull
  @MayContainNull
  @Weight(Weight.Unit.NORMAL)
  public static <T> T[] joinArrays(@MayContainNull final T[]... arrays) {
    int commonLength = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        commonLength += array.length;
      }
    }
    @SuppressWarnings("unchecked")
    final T[] result = (T[]) Array.newInstance(arrays.getClass().getComponentType().getComponentType(), commonLength);
    int position = 0;
    for (final T[] array : arrays) {
      if (array != null) {
        System.arraycopy(array, 0, result, position, array.length);
        position += array.length;
      }
    }
    return result;
  }
519880
public function setConjunction(string $conjunction = self::DEFAULT_CONJUNCTION) : void
    {
        if (! in_array($conjunction, self::CONJUNCTIONS)) {
            throw new \RuntimeException(sprintf('Invalid conjunction provided: %s', $conjunction));
        }

        $this->conjunction = $conjunction;
    }
724268
public static String join(final Object array, final String separator) {

    return isArray(array) ? join(toArray(array, ClassUtils.getComponentClass(array)), separator)
      : Objects.toString(array);
  }
1143611
public static void oddEvenSort( double arrayToBeSorted[], double[] arrayThatFollowsTheSort ) {
        for( int i = 0; i < arrayToBeSorted.length / 2; i++ ) {
            for( int j = 0; j + 1 < arrayToBeSorted.length; j += 2 )
                if (arrayToBeSorted[j] > arrayToBeSorted[j + 1]) {
                    double tmpa = arrayToBeSorted[j];
                    arrayToBeSorted[j] = arrayToBeSorted[j + 1];
                    arrayToBeSorted[j + 1] = tmpa;
                    if (arrayThatFollowsTheSort != null) {
                        double tmpb = arrayThatFollowsTheSort[j];
                        arrayThatFollowsTheSort[j] = arrayThatFollowsTheSort[j + 1];
                        arrayThatFollowsTheSort[j + 1] = tmpb;
                    }
                }
            for( int j = 1; j + 1 < arrayToBeSorted.length; j += 2 )
                if (arrayToBeSorted[j] > arrayToBeSorted[j + 1]) {
                    double tmpa = arrayToBeSorted[j];
                    arrayToBeSorted[j] = arrayToBeSorted[j + 1];
                    arrayToBeSorted[j + 1] = tmpa;
                    if (arrayThatFollowsTheSort != null) {
                        double tmpb = arrayThatFollowsTheSort[j];
                        arrayThatFollowsTheSort[j] = arrayThatFollowsTheSort[j + 1];
                        arrayThatFollowsTheSort[j + 1] = tmpb;
                    }
                }
        }
    }
638366
public static String join(Object array, char separator, Object... pieces) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0, ii = Array.getLength(array); i < ii; ++i) {
            Object element = Array.get(array, i);
            sb.append(element != null ? element.toString() : "null").append(separator);
        }
        for (int i = 0; i < pieces.length; ++i) {
            sb.append(pieces[i] != null ? pieces[i].toString() : "null").append(separator);
        }
        if (sb.length() > 0) sb.setLength(sb.length()-1);
        return sb.toString();
    }
295528
public static void join(StringBuilder sb, Object[] array, String delimiter) {
        if (empty(array)) { return; }
        sb.append(array[0]);
        for (int i = 1; i < array.length; i++) {
            sb.append(delimiter);
            sb.append(array[i]);
        }
    }
903387
public static String jsonJoin(String[] array) {
        int arraySize = array.length;
        int bufSize = arraySize * (array[0].length() + 3);
        StringBuilder buf = new StringBuilder(bufSize);
        for (int i = 0; i < arraySize; i++) {
            if (i > 0) {
                buf.append(',');
            }

            buf.append('"');
            buf.append(array[i]);
            buf.append('"');
        }
        return buf.toString();
    }
567971
public static <T> String join(Iterator<T> iterator, CharSequence conjunction, String prefix, String suffix) {
		if (null == iterator) {
			return null;
		}

		final StringBuilder sb = new StringBuilder();
		boolean isFirst = true;
		T item;
		while (iterator.hasNext()) {
			if (isFirst) {
				isFirst = false;
			} else {
				sb.append(conjunction);
			}

			item = iterator.next();
			if (ArrayUtil.isArray(item)) {
				sb.append(ArrayUtil.join(ArrayUtil.wrap(item), conjunction, prefix, suffix));
			} else if (item instanceof Iterable<?>) {
				sb.append(join((Iterable<?>) item, conjunction, prefix, suffix));
			} else if (item instanceof Iterator<?>) {
				sb.append(join((Iterator<?>) item, conjunction, prefix, suffix));
			} else {
				sb.append(StrUtil.wrap(String.valueOf(item), prefix, suffix));
			}
		}
		return sb.toString();
	}
1096916
public static <T> T[] removeNull(T[] array) {
		return filter(array, new Editor<T>() {
			@Override
			public T edit(T t) {
				// 返回null便不加入集合
				return t;
			}
		});
	}
826994
@SuppressWarnings("unchecked")
    public static <E> void mergeArrayIntoCollection(Object array, Collection<E> collection) {
        if (collection == null) {
            throw new IllegalArgumentException("Collection must not be null");
        }
        Object[] arr = ObjectUtils.toObjectArray(array);
        for (Object elem : arr) {
            collection.add((E)elem);
        }
    }
420845
public static <T> T[] concat(T firstElement, T... array) {
		@SuppressWarnings("unchecked")
		T[] result = (T[]) Array.newInstance( firstElement.getClass(), 1 + array.length );
		result[0] = firstElement;
		System.arraycopy( array, 0, result, 1, array.length );

		return result;
	}
169578
private static int[] getComplement(int[] subset, int[] fullset) {
        int size = fullset.length - subset.length;

        // Returns null if no complement
        if (size < 1) {
            return null;
        }

        // Otherwsise define combination array and determine complement
        int[] complement = new int[size];
        int index = 0;
        for (int i = 0; i < fullset.length; i++) {
            int item = fullset[i];
            boolean member = false;
            for (int j = 0; j < subset.length; j++) {
                if (item == subset[j]) {
                    member = true;
                    break;
                }
            }

            if (!member) {
                complement[index++] = item;
            }

        }

        return complement;
    }