Пример #1
1
 @Override
 protected PriorityQueue<Long> ofAll(long[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #2
1
 @Override
 protected PriorityQueue<Short> ofAll(short[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #3
1
 @Override
 protected PriorityQueue<Float> ofAll(float[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #4
1
 @Override
 protected PriorityQueue<Integer> ofAll(int[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #5
1
 @Override
 protected PriorityQueue<Character> ofAll(char[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #6
1
 @Override
 protected PriorityQueue<Double> ofAll(double[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #7
1
 @Override
 protected PriorityQueue<Boolean> ofAll(boolean[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #8
1
 @Override
 protected PriorityQueue<Byte> ofAll(byte[] array) {
   return PriorityQueue.ofAll(List.ofAll(array));
 }
Пример #9
0
 @Override
 protected <T> Traversable<T> ofJavaStream(Stream<? extends T> javaStream) {
   return PriorityQueue.ofAll(toStringComparator(), javaStream);
 }
Пример #10
0
 @Override
 protected <T> PriorityQueue<T> ofAll(Iterable<? extends T> elements) {
   return PriorityQueue.ofAll(toStringComparator(), elements);
 }
Пример #11
0
 @Override
 @SuppressWarnings("unchecked")
 protected final <T> PriorityQueue<T> of(T... elements) {
   return PriorityQueue.ofAll(toStringComparator(), List.of(elements));
 }
Пример #12
0
 @Override
 protected <T> PriorityQueue<T> of(T element) {
   return PriorityQueue.ofAll(toStringComparator(), List.of(element));
 }
Пример #13
0
 @Test
 public void toListIsSortedAccordingToComparator() {
   final Comparator<Integer> comparator = composedComparator();
   final PriorityQueue<Integer> queue = PriorityQueue.ofAll(comparator, values);
   assertThat(queue.toList()).isEqualTo(values.sorted(comparator));
 }