Record Class Multirange<A>
java.lang.Object
java.lang.Record
io.codemine.java.postgresql.codecs.Multirange<A>
- Type Parameters:
A- the element type of the ranges- Record Components:
ranges- the list of ranges in this multirange, in sorted order
PostgreSQL multirange type. A collection of non-overlapping, non-adjacent ranges stored as a
single value.
PostgreSQL automatically normalizes multiranges by combining overlapping and adjacent ranges. The ranges are stored in sorted order.
The standard PostgreSQL multirange types are:
int4multirange—Multirange<Integer>int8multirange—Multirange<Long>nummultirange—Multirange<java.math.BigDecimal>tsmultirange—Multirange<java.time.LocalDateTime>tstzmultirange—Multirange<java.time.Instant>datemultirange—Multirange<java.time.LocalDate>
-
Constructor Summary
ConstructorsConstructorDescriptionMultirange(List<Range<A>> ranges) Compact constructor that makes an immutable copy of ranges. -
Method Summary
-
Constructor Details
-
Multirange
Compact constructor that makes an immutable copy of ranges.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
ranges
Returns the value of therangesrecord component.- Returns:
- the value of the
rangesrecord component
-