Package io.permazen.util
Interface NaturalSortAware
- All Known Subinterfaces:
Encoding<T>
- All Known Implementing Classes:
AbstractEncoding
,ArrayEncoding
,Base64ArrayEncoding
,BigDecimalEncoding
,BigIntegerEncoding
,BitSetEncoding
,BooleanArrayEncoding
,BooleanEncoding
,ByteArrayEncoding
,ByteEncoding
,CharacterArrayEncoding
,CharacterEncoding
,Concat2Encoding
,Concat3Encoding
,Concat4Encoding
,Concat5Encoding
,ConvertedEncoding
,DateEncoding
,DoubleArrayEncoding
,DoubleEncoding
,DoubleSummaryStatisticsEncoding
,DurationEncoding
,EnumValueEncoding
,FileEncoding
,FloatArrayEncoding
,FloatEncoding
,Inet4AddressEncoding
,Inet6AddressEncoding
,InetAddressEncoding
,InstantEncoding
,IntegerArrayEncoding
,IntegerEncoding
,IntegralArrayEncoding
,IntegralEncoding
,InternetAddressEncoding
,IntSummaryStatisticsEncoding
,LocalDateEncoding
,LocalDateTimeEncoding
,LocalTimeEncoding
,LongArrayEncoding
,LongEncoding
,LongSummaryStatisticsEncoding
,MonthDayEncoding
,NullSafeEncoding
,NumberEncoding
,ObjectArrayEncoding
,ObjIdEncoding
,OffsetDateTimeEncoding
,OffsetTimeEncoding
,PatternEncoding
,PeriodEncoding
,PrimitiveEncoding
,PrimitiveWrapperEncoding
,ReferenceEncoding
,ShortArrayEncoding
,ShortEncoding
,StringConvertedEncoding
,StringEncoding
,Tuple2Encoding
,Tuple3Encoding
,Tuple4Encoding
,Tuple5Encoding
,TupleEncoding
,UnsignedIntEncoding
,URIEncoding
,UUIDEncoding
,VoidEncoding
,YearEncoding
,YearMonthEncoding
,ZonedDateTimeEncoding
,ZoneIdEncoding
,ZoneOffsetEncoding
public interface NaturalSortAware
Implemented by
Comparator
classes that know whether or not their ordering is
identical to the target Java type's natural ordering.-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine if this instance sorts Java instances naturally.
-
Method Details
-
sortsNaturally
boolean sortsNaturally()Determine if this instance sorts Java instances naturally.This method should return true only if all of the following are true:
- This class also implements
Comparator
for some Java typeT
. - Type
T
has a natural ordering (i.e.,T
itself implementsComparable
). - The ordering implied by this class's
compare()
method is identical toT
's natural ordering.
- Returns:
- true if this instance orders Java values in their natural order
- This class also implements
-