Package org.dspace.content
Class MetadataValueComparators
- java.lang.Object
-
- org.dspace.content.MetadataValueComparators
-
public final class MetadataValueComparators extends Object
This class contains only static members that can be used to sort list ofMetadataValue- Author:
- Vincenzo Mecca (vins01-4science - vincenzo.mecca at 4science.com)
-
-
Field Summary
Fields Modifier and Type Field Description static Comparator<MetadataValue>defaultComparatorThis is the default comparator that mimics the ordering applied by the standard@OrderByannotation insideDSpaceObject.getMetadata()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<MetadataValue>sort(List<MetadataValue> metadataValues)This method creates a newList<MetadataValue>ordered by theMetadataComparators#defaultComparator.
-
-
-
Field Detail
-
defaultComparator
public static final Comparator<MetadataValue> defaultComparator
This is the default comparator that mimics the ordering applied by the standard@OrderByannotation insideDSpaceObject.getMetadata()
-
-
Method Detail
-
sort
public static final List<MetadataValue> sort(List<MetadataValue> metadataValues)
This method creates a newList<MetadataValue>ordered by theMetadataComparators#defaultComparator.- Parameters:
metadataValues-- Returns:
List<MetadataValue>ordered copy list using stream.
-
-