Package org.gbif.api.util.comparators
Class EndpointPriorityComparator
- java.lang.Object
-
- org.gbif.api.util.comparators.EndpointPriorityComparator
-
- All Implemented Interfaces:
Serializable
,Comparator<Endpoint>
public class EndpointPriorityComparator extends Object implements Comparator<Endpoint>, Serializable
Compares two Endpoints. It does so by using a priority list of Endpoint Types. This Comparator will throw aClassCastException
exception if a non supported EndpointType is passed in. It also does not supportnull
values. The priority list is as follows (most to least important):- CamtrapDP
- DwC-A
- TAPIR
- BioCASe
- DiGIR
- DiGIR (Manis)
- EML
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static List<EndpointType>
PRIORITIES
-
Constructor Summary
Constructors Constructor Description EndpointPriorityComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Endpoint endpoint1, Endpoint endpoint2)
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
PRIORITIES
public static final List<EndpointType> PRIORITIES
-
-
Constructor Detail
-
EndpointPriorityComparator
public EndpointPriorityComparator()
-
-