public class ItemComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable
| Constructor and Description |
|---|
ItemComparator(java.lang.String element,
java.lang.String qualifier,
java.lang.String language,
boolean max)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(java.lang.Object first,
java.lang.Object second)
Compare two Items by checking their DCValues for element, qualifier, and
language.
|
boolean |
equals(java.lang.Object obj)
Return true if the object is equal to this one, false otherwise.
|
int |
hashCode() |
public ItemComparator(java.lang.String element,
java.lang.String qualifier,
java.lang.String language,
boolean max)
element - The Dublin Core elementqualifier - The Dublin Core qualifierlanguage - The language for the DCValuesmax - If true, and there is more than one DCValue for element,
qualifier and language, then use the maximum value
lexicographically; otherwise use the minimum value.public int compare(java.lang.Object first,
java.lang.Object second)
Return >= 1 if the first is lexicographically greater than the second; <= -1 if the second is lexicographically greater than the first, and 0 otherwise.
compare in interface java.util.Comparatorfirst - The first object to compare. Must be an object of type
org.dspace.content.Item.second - The second object to compare. Must be an object of type
org.dspace.content.Item.public boolean equals(java.lang.Object obj)
equals in interface java.util.Comparatorequals in class java.lang.Objectobj - The object to compare to.public int hashCode()
hashCode in class java.lang.ObjectCopyright © 2013 DuraSpace. All Rights Reserved.