Return all value from Option Collection

@param values
763402
public static <T> List<T> getAll(Collection<Option<T>> values) {
    List<T> results = CollectUtils.newArrayList(values.size());
    for (Option<T> op : values) {
      if (op.isDefined()) results.add(op.get());
    }
    return results;
  }
327598
@SafeVarargs
    public static <T> List<T> newLists(T... values) {
        if(null == values || values.length == 0){
            Assert.notNull(values, "values not is null.");
        }
        return Arrays.asList(values);
    }
547248
public static Query all(String field, Collection<?> values) {
        return new Query().all(field, values);
    }
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;
	}
793935
@SuppressWarnings({ "unchecked", "checkstyle:illegaltype" })
	Collection<V> copyValues(Collection<V> values) {
		final Object backEnd = DataViewDelegate.undelegate(values);
		if (backEnd instanceof List<?>) {
			return Lists.newArrayList(values);
		}
		if (backEnd instanceof TreeSet<?>) {
			TreeSet<V> c = (TreeSet<V>) backEnd;
			c = Sets.newTreeSet(c.comparator());
			c.addAll(values);
			return c;
		}
		if (backEnd instanceof LinkedHashSet<?>) {
			return Sets.newLinkedHashSet(values);
		}
		if (backEnd instanceof Set<?>) {
			return Sets.newHashSet(values);
		}
		throw new IllegalStateException("Unsupported type of the backend multimap: " + values.getClass()); //$NON-NLS-1$
	}
1193658
protected String randomValue(List<String> values) {
		if (values == null || values.isEmpty()) {
			throw new InvalidFunctionUsageException("No values to choose from");
		}
		
		final int idx = random.nextInt(values.size());
		
		return values.get(idx);
	}
201277
@SafeVarargs
  public final R in(T... values) {
    expr().in(_name, (Object[]) values);
    return _root;
  }
318966
public static boolean containsOnlyNull(Object... values){	
		for(Object o : values){
			if(o!= null){
				return false;
			}
		}
		return true;
	}
466833
public ContainerRuntimeOptionType<T> value(String ... values)
   {
      if (values != null)
      {
         for(String name: values)
         {
            childNode.createChild("value").text(name);
         }
      }
      return this;
   }
1162453
public final Condition in(final Collection<V> values) {
        return new Condition().withComparisonOperator(IN).withAttributeValueList(LIST.convert(values, this));
    }
587
protected void view(Map<String, Object> values){
        for(String key:values.keySet() ){
            view(key, values.get(key));
        }
    }
1059740
public static <T> T pick(T[] values) {
		if (values == null || values.length == 0)
			return null;

		return values[RandomInteger.nextInteger(values.length)];
	}
118092
private String get(String... values) {
            if (values != null) {
                for (String value : values) {
                    if (!StringUtils.isEmpty(value)) {
                        return value;
                    }
                }
            }
            return null;
        }
884343
public static <T> T mode(Collection<T> values) {
    Set<T> modes = modes(values);
    return modes.iterator().next();
  }
467764
private synchronized Collection<IInputValue> annotatedValuesToInputValues(Collection<IAnnotatedValue> values) throws ModelException
    {
        restartInputsMap();
        Collection<IInputValue> inputValues = new HashSet<IInputValue>();
        for (IAnnotatedValue annotatedValue : values)
        {
            IInput input = input(annotatedValue);
            if (null == input)
            {
                throw new ServiceExecutionException("Cannot find a suitable input for value: " + annotatedValue, null);
            }
            inputValues.add(addInputValue(input, annotatedValue));
        }
        return inputValues;
    }
1262279
public static <T> T pick(List<T> values) {
		if (values == null || values.size() == 0)
			return null;

		int index = RandomInteger.nextInteger(values.size());
		return values.get(index);
	}
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;
	}