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