Package org.elasticsearch.test.fixture
Record Class HttpHeaderParser.ContentRange
java.lang.Object
java.lang.Record
org.elasticsearch.test.fixture.HttpHeaderParser.ContentRange
- Record Components:
start
- The start of the rangeend
- The end of the rangesize
- The total size
- Enclosing class:
HttpHeaderParser
A HTTP "Content Range"
This will always contain one of the following combinations of values:
- start, end, size
- start, end
- size
- nothing
-
Constructor Summary
ConstructorsConstructorDescriptionContentRange
(Long start, Long end, Long size) Creates an instance of aContentRange
record class. -
Method Summary
Modifier and TypeMethodDescriptionend()
Returns the value of theend
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
hasRange()
boolean
hasSize()
size()
Returns the value of thesize
record component.start()
Returns the value of thestart
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
hasRange
public boolean hasRange() -
hasSize
public boolean hasSize() -
headerString
-
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)
. -
start
Returns the value of thestart
record component.- Returns:
- the value of the
start
record component
-
end
Returns the value of theend
record component.- Returns:
- the value of the
end
record component
-
size
Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-