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 a
ClassCastException
exception if a non supported EndpointType is passed in. It also does not
support null
values.
The priority list is as follows (most to least important):
- CamtrapDP
- DwC-A
- TAPIR
- BioCASe
- DiGIR
- DiGIR (Manis)
- EML
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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 Details
-
PRIORITIES
-
-
Constructor Details
-
EndpointPriorityComparator
public EndpointPriorityComparator()
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Endpoint>
-