将原始类型数组包装为包装类型

@param values 原始类型数组
@return 包装类型数组
484820
public static Integer[] wrap(int... values) {
		if (null == values) {
			return null;
		}
		final int length = values.length;
		if (0 == length) {
			return new Integer[0];
		}

		final Integer[] array = new Integer[length];
		for (int i = 0; i < length; i++) {
			array[i] = Integer.valueOf(values[i]);
		}
		return array;
	}
1159182
public static int[] unWrap(Integer... values) {
		if (null == values) {
			return null;
		}
		final int length = values.length;
		if (0 == length) {
			return new int[0];
		}

		final int[] array = new int[length];
		for (int i = 0; i < length; i++) {
			array[i] = values[i].intValue();
		}
		return array;
	}
929098
public static <T extends Enum<?>> T enumFromString(final String value, final T[] values) {
        if (value == null) {
            return null;
        }

        for (T v : values) {
            if (v.toString().equalsIgnoreCase(value)) {
                return v;
            }
        }

        return null;
    }
964186
public static String rTrim(final String value) {
        if (value == null) {
            return null;
        }

        String trimmed = value;
        int offset = value.length() - 1;
        while (offset > -1 && (value.charAt(offset) == ' ' || value.charAt(offset) == '\t')) {
            offset--;
        }

        if (offset < value.length() - 1) {
            trimmed = value.substring(0, offset + 1);
        }

        return trimmed;
    }
524908
public static ByteBuf copyShort(short... values) {
        if (values == null || values.length == 0) {
            return EMPTY_BUFFER;
        }
        ByteBuf buffer = buffer(values.length * 2);
        for (int v: values) {
            buffer.writeShort(v);
        }
        return buffer;
    }
237297
public String[] buildValueWhereArgs(Collection<ColumnValue> values) {
		List<String> selectionArgs = new ArrayList<String>();
		for (ColumnValue value : values) {
			if (value != null && value.getValue() != null) {
				if (value.getTolerance() != null) {
					String[] toleranceArgs = getValueToleranceRange(value);
					selectionArgs.add(toleranceArgs[0]);
					selectionArgs.add(toleranceArgs[1]);
				} else {
					selectionArgs.add(value.getValue().toString());
				}
			}
		}
		return selectionArgs.isEmpty() ? null : selectionArgs
				.toArray(new String[] {});
	}
500966
public static long max(final long[] values) {
		long max = Long.MIN_VALUE;
		if (values.length > 0) {
			max = values[0];

			for (int i = 0; i < values.length; ++i) {
				if (values[i] > max) {
					max = values[i];
				}
			}
		}

		return max;
	}
1115348
protected String eval(final Object[] _values)
    {
        final String ret;
        if ((_values == null) || (_values.length == 0) || (_values[0] == null))  {
            ret = null;
        } else if (_values[0] instanceof String) {
            ret = (String) _values[0];
        } else if (_values[0] != null) {
            ret = _values[0].toString();
        } else  {
            ret = null;
        }
        return ret;
    }
337631
private String clean(final Collection<String> values) {
    if (values == null || values.size() == 0) {
      return "";
    }

    final List<String> strs = Lists.newArrayList();
    for (String v : values) {
      final String tmp = v.replaceAll("\\{.*\\}", "");
      final int ix = tmp.lastIndexOf(':');
      if (ix < 0) {
        strs.add(tmp);
      } else {
        strs.add(tmp.substring(ix+1));
      }
    }

    return DOUBLE_COMMA_JOINER.join(strs);
  }
29973
@Pure
	public static float max(float... values) {
		if (values == null || values.length == 0) {
			return Float.NaN;
		}
		float max = values[0];
		for (final float v : values) {
			if (v > max) {
				max = v;
			}
		}
		return max;
	}
357941
protected String join(Object[] values)
    {
        StringBuilder sb = new StringBuilder(100);
        if(values.length == 0)
            return sb.toString();

        sb.append(values[0]);

        if(values.length == 1)
            return sb.toString();

        for (int i = 1; i < values.length; i++)
        {
            sb.append(",").append(values[i]);
        }

        return sb.toString();
    }
585671
public long min(long... values) {
        long min = Long.MAX_VALUE;
        for (int i = 0; i < values.length; i++) {
            if (i == 0 || values[i] < min) {
                min = values[i];
            }
        }
        
        return min;
    }
1229851
public static String pick(String[] values) {
		if (values == null || values.length == 0)
			return "";

		int index = RandomInteger.nextInteger(values.length);
		return values[index];
	}
1065426
@Deprecated
    public static List<String> trim(List<String> values) {
        List<String> trimmed = new ArrayList<>();
        for (String value : values) {
            trimmed.add(value.trim());
        }
        return trimmed;
    }
196282
protected void parsePropertiesInKeyValueFormat(List<GetValue> values) {
		if (values == null) {
			return;
		}

		for (GetValue getValue : values) {
			String key = getValue.getKey();
			if (!StringUtils.endsWithIgnoreCase(key, "/")) {
				key = key.replace(this.context, "").replace('/', '.');
				String value = getValue.getDecodedValue();
				this.properties.put(key, value);
			}
		}
	}
1117838
public static String normalizeWS(String value) {
    char[] tmp = new char[value.length()];
    int pos = 0;
    boolean prevws = false;
    for (int ix = 0; ix < tmp.length; ix++) {
      char ch = value.charAt(ix);
      if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r') {
        if (prevws && pos != 0)
          tmp[pos++] = ' ';

        tmp[pos++] = ch;
        prevws = false;
      } else
        prevws = true;
    }
    return new String(tmp, 0, pos);
  }
602210
function clean(values) {
  var index = -1;
  var length = values.length;
  var result = [];
  var prev = null;
  var value;

  while (++index < length) {
    value = values[index];

    if (prev && 'value' in value && value.type === prev.type) {
      prev.value += value.value;
    } else {
      result.push(value);
      prev = value;
    }
  }

  return result;
}