- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 130 for Ordering (0.11 sec)
-
guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java
} } return dummy; } @Benchmark int ordering(int reps) { int dummy = 0; if (mutable) { for (int i = 0; i < reps; i++) { dummy += ORDERING.sortedCopy(input).get(0); } } else { for (int i = 0; i < reps; i++) { dummy += ORDERING.immutableSortedCopy(input).get(0); } } return dummy; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.5K bytes - Viewed (0) -
compat/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactUtilsTest.java
assertEquals("1.2.3-20090413X094722-2", ArtifactUtils.toSnapshotVersion("1.2.3-20090413X094722-2")); } /** * Tests that the ordering of the map resembles the ordering of the input collection of artifacts. */ @Test void testArtifactMapByVersionlessIdOrdering() throws Exception { List<Artifact> list = new ArrayList<>();
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 2.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ByFunctionOrdering.java
ByFunctionOrdering(Function<F, ? extends T> function, Ordering<T> ordering) { this.function = checkNotNull(function); this.ordering = checkNotNull(ordering); } @Override public int compare(@ParametricNullness F left, @ParametricNullness F right) { return ordering.compare(function.apply(left), function.apply(right)); } @Override public boolean equals(@CheckForNull Object object) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sun Jun 20 14:22:42 UTC 2021 - 2.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/SortedCopyBenchmark.java
} } return dummy; } @Benchmark int ordering(int reps) { int dummy = 0; if (mutable) { for (int i = 0; i < reps; i++) { dummy += ORDERING.sortedCopy(input).get(0); } } else { for (int i = 0; i < reps; i++) { dummy += ORDERING.immutableSortedCopy(input).get(0); } } return dummy; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/GeneralRangeTest.java
GeneralRange<@Nullable Integer> range = GeneralRange.downTo(ORDERING, 3, lBoundType); for (Integer i : IN_ORDER_VALUES) { assertEquals( ORDERING.compare(i, 3) > 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == CLOSED), range.contains(i)); assertEquals( ORDERING.compare(i, 3) < 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == OPEN), range.tooLow(i));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/GeneralRangeTest.java
GeneralRange<@Nullable Integer> range = GeneralRange.downTo(ORDERING, 3, lBoundType); for (Integer i : IN_ORDER_VALUES) { assertEquals( ORDERING.compare(i, 3) > 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == CLOSED), range.contains(i)); assertEquals( ORDERING.compare(i, 3) < 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == OPEN), range.tooLow(i));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 8.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/NullsFirstOrdering.java
/** An ordering that treats {@code null} as less than all other values. */ @GwtCompatible(serializable = true) @ElementTypesAreNonnullByDefault final class NullsFirstOrdering<T extends @Nullable Object> extends Ordering<@Nullable T> implements Serializable { final Ordering<? super T> ordering; NullsFirstOrdering(Ordering<? super T> ordering) { this.ordering = ordering; } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 27 16:03:47 UTC 2023 - 2.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/graph/ElementOrderTest.java
import static com.google.common.graph.ElementOrder.unordered; import static com.google.common.truth.Truth.assertThat; import com.google.common.collect.Ordering; import java.util.Comparator; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** Tests for ordering the elements of graphs. */ @RunWith(JUnit4.class) public final class ElementOrderTest { // Node order tests @Test
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 8.1K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/NaturalOrdering.java
@Override public <S extends Comparable<?>> Ordering<@Nullable S> nullsFirst() { Ordering<@Nullable Comparable<?>> result = nullsFirst; if (result == null) { result = nullsFirst = super.<Comparable<?>>nullsFirst(); } return (Ordering<@Nullable S>) result; } @Override public <S extends Comparable<?>> Ordering<@Nullable S> nullsLast() { Ordering<@Nullable Comparable<?>> result = nullsLast;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Jun 26 21:02:13 UTC 2023 - 2.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ComparatorsTest.java
.addEqualityGroup(Ordering.natural()) .testEquals(); } public void testIsInOrder() { assertFalse(isInOrder(asList(5, 3, 0, 9), Ordering.natural())); assertFalse(isInOrder(asList(0, 5, 3, 9), Ordering.natural())); assertTrue(isInOrder(asList(0, 3, 5, 9), Ordering.natural())); assertTrue(isInOrder(asList(0, 0, 3, 3), Ordering.natural()));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6.4K bytes - Viewed (0)