@Test void push() { Stack<String> stack = StackUtils.push(new Stack<>(), "a", "b", "c"); Assertions.assertEquals(3, stack.size()); Assertions.assertEquals("c", stack.pop()); }
@SafeVarargs public static <T> Stack<T> push(Stack<T> stack, T... values) { Arrays.stream(values).forEach(stack::push); return stack; }
StackUtils { @SafeVarargs public static <T> Stack<T> push(Stack<T> stack, T... values) { Arrays.stream(values).forEach(stack::push); return stack; } }
StackUtils { @SafeVarargs public static <T> Stack<T> push(Stack<T> stack, T... values) { Arrays.stream(values).forEach(stack::push); return stack; } private  StackUtils(); }
StackUtils { @SafeVarargs public static <T> Stack<T> push(Stack<T> stack, T... values) { Arrays.stream(values).forEach(stack::push); return stack; } private  StackUtils(); @SafeVarargs static Stack<T> push(Stack<T> stack, T... values); static Stack<T> popSilently(Stack<T> stack, int amount); static Stack<T> fill(Stack<T> stack, T object, int amount); static Stack<T> reverse(Stack<T> stack); static Stack<T> of(Collection<? extends T> collection); }
StackUtils { @SafeVarargs public static <T> Stack<T> push(Stack<T> stack, T... values) { Arrays.stream(values).forEach(stack::push); return stack; } private  StackUtils(); @SafeVarargs static Stack<T> push(Stack<T> stack, T... values); static Stack<T> popSilently(Stack<T> stack, int amount); static Stack<T> fill(Stack<T> stack, T object, int amount); static Stack<T> reverse(Stack<T> stack); static Stack<T> of(Collection<? extends T> collection);  }