Debian Codegraph @

src/uk/me/parabola/imgfmt/app/srt/SortKey.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2010.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 or
6 * version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13
14 package uk.me.parabola.imgfmt.app.srt;
15
16 /**
17 * A sort key that allows efficient comparison of a string with a particular sorting order multiple times.
18 *
19 * The general idea is that you create a key for each object to be sorted and then sort the keys. Once the
20 * keys are sorted you retrieve the original object via the {@link #getObject} method.
21 *
22 * @author Steve Ratcliffe
23 */
24 public interface SortKey<T> extends Comparable<SortKey<T>> {
25 /**
26 * Get the object associated with this sort key.
27 * This will usually be the real object being sorted.
28 */
29 public T getObject();
30 }