Examples of sort()


Examples of org.apache.isis.viewer.dnd.view.collection.SimpleCollectionSorter.sort()

    @Test
    public void testSortByTitle() {
        final ObjectAdapter[] instances = new ObjectAdapter[] { adapterWithTitle("one"), adapterWithTitle("two"), adapterWithTitle("three"), adapterWithTitle("four"), };

        final SimpleCollectionSorter sorter = new SimpleCollectionSorter();
        sorter.sort(instances, new TitleComparator(), CollectionSorter.NORMAL);

        assertEquals("four", instances[0].titleString());
        assertEquals("one", instances[1].titleString());
        assertEquals("three", instances[2].titleString());
        assertEquals("two", instances[3].titleString());
View Full Code Here

Examples of org.apache.ivy.plugins.latest.LatestStrategy.sort()

            infos[i] = new ResolvedModuleRevisionArtifactInfo(revisions[i]);
        }

        VersionMatcher matcher = settings.getVersionMatcher();
        LatestStrategy latestStrategy = settings.getLatestStrategy("latest-revision");
        List sorted = latestStrategy.sort(infos);

        ModuleRevisionId askedMrid = ModuleRevisionId.newInstance(organisation, module, branch,
            revision);

        String foundRevision = null;
View Full Code Here

Examples of org.apache.jackrabbit.vault.util.console.util.Table.sort()

        Iterator iter = ctx.getPropertyKeys().iterator();
        while (iter.hasNext()) {
            String key = (String) iter.next();
            t.addRow(key, ctx.getProperty(key));
        }
        t.sort(0);
        t.print();
    }


    public String getShortDescription() {
View Full Code Here

Examples of org.apache.jetspeed.portal.portlets.browser.BrowserIterator.sort()

            }
            else
            {
                if(sortColName != null)
                {
                    iterator.sort(sortColName);
                }
                iterator.setTop(start);
            }

            readLinkParameters(portlet, rundata, context);
View Full Code Here

Examples of org.apache.karaf.shell.commands.impl.SortAction.sort()

        String outputString = ("abc" + newLine + "def" + newLine);
        SortAction sort = new SortAction();
        Field unique = SortAction.class.getDeclaredField("unique");
        unique.setAccessible(true);
        unique.set(sort, true);
        sort.sort(new ByteArrayInputStream(input), new PrintStream(baos));
        assertEquals(outputString, new String(baos.toByteArray()));
    }

}
View Full Code Here

Examples of org.apache.lucene.util.BytesRefHash.sort()

    } else if (size == 0) {
      return this.getTopLevelQuery();
    } else {
      final NodeBooleanQuery bq = this.getTopLevelQuery();
      final BytesRefHash pendingTerms = col.pendingTerms;
      final int sort[] = pendingTerms.sort(col.termsEnum.getComparator());
      for(int i = 0; i < size; i++) {
        final int pos = sort[i];
        // docFreq is not used for constant score here, we pass 1
        // to explicitely set a fake value, so it's not calculated
        this.addClause(bq,
View Full Code Here

Examples of org.apache.lucene.util.OfflineSorter.sort()

        } else {
          return cmp;
        }
      }
    });
    sorter.sort(unsorted, sorted);
    unsorted.delete();
   
    ByteSequencesReader reader = new ByteSequencesReader(sorted);
    BytesRef scratchLine = new BytesRef();
   
View Full Code Here

Examples of org.apache.mahout.math.list.ByteArrayList.sort()

   * Returns a string representation of the receiver, containing the String representation of each key-value pair,
   * sorted ascending by key.
   */
  public String toString() {
    ByteArrayList theKeys = keys();
    theKeys.sort();

    StringBuilder buf = new StringBuilder();
    buf.append('[');
    int maxIndex = theKeys.size() - 1;
    for (int i = 0; i <= maxIndex; i++) {
View Full Code Here

Examples of org.apache.mahout.math.list.CharArrayList.sort()

   * Returns a string representation of the receiver, containing the String representation of each key-value pair,
   * sorted ascending by key.
   */
  public String toString() {
    CharArrayList theKeys = keys();
    theKeys.sort();

    StringBuilder buf = new StringBuilder();
    buf.append('[');
    int maxIndex = theKeys.size() - 1;
    for (int i = 0; i <= maxIndex; i++) {
View Full Code Here

Examples of org.apache.mahout.math.list.DoubleArrayList.sort()

   * Returns a string representation of the receiver, containing the String representation of each key-value pair,
   * sorted ascending by key.
   */
  public String toString() {
    DoubleArrayList theKeys = keys();
    theKeys.sort();

    StringBuilder buf = new StringBuilder();
    buf.append('[');
    int maxIndex = theKeys.size() - 1;
    for (int i = 0; i <= maxIndex; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.