List of usage examples for com.liferay.portal.kernel.util ArrayUtil reverse
public static <T> void reverse(T[] array)
From source file:com.liferay.asset.service.test.AssetEntryQueryTest.java
License:Open Source License
@Test public void testOrderByViewCountsDesc() throws Exception { int[] viewCounts = new int[10]; int[] orderedViewCounts = new int[10]; for (int i = 0; i < viewCounts.length; i++) { int randomInt = RandomTestUtil.randomInt(); viewCounts[i] = randomInt;/* ww w . j a v a 2s .co m*/ orderedViewCounts[i] = randomInt; } Arrays.sort(orderedViewCounts); ArrayUtil.reverse(orderedViewCounts); testOrderByViewCount(viewCounts, orderedViewCounts, "DESC"); }