java.lang.Object
java.lang.Record
org.elasticsearch.useragent.api.Details
- Record Components:
name- the user-agent name (e.g. "Chrome");nullwhen no matchversion- the pre-computed user-agent version string (e.g. "33.0.1750");nullwhen major was absentos- the operating system name and version;nullwhen no OS matchosFull- the pre-computed full OS string (e.g. "Mac OS X 10.9.2");nullwhen OS version was absentdevice- the device name and version;nullwhen no device matchdeviceType- the device type (e.g. "Desktop", "Phone");nullwhen not extracted
public record Details(String name, String version, VersionedName os, String osFull, VersionedName device, String deviceType)
extends Record
Parsed user-agent information.
-
Constructor Summary
ConstructorsConstructorDescriptionDetails(String name, String version, VersionedName os, String osFull, VersionedName device, String deviceType) Creates an instance of aDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondevice()Returns the value of thedevicerecord component.Returns the value of thedeviceTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.os()Returns the value of theosrecord component.osFull()Returns the value of theosFullrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Details
public Details(@Nullable String name, @Nullable String version, @Nullable VersionedName os, @Nullable String osFull, @Nullable VersionedName device, @Nullable String deviceType) Creates an instance of aDetailsrecord class.- Parameters:
name- the value for thenamerecord componentversion- the value for theversionrecord componentos- the value for theosrecord componentosFull- the value for theosFullrecord componentdevice- the value for thedevicerecord componentdeviceType- the value for thedeviceTyperecord component
-
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
os
Returns the value of theosrecord component.- Returns:
- the value of the
osrecord component
-
osFull
Returns the value of theosFullrecord component.- Returns:
- the value of the
osFullrecord component
-
device
Returns the value of thedevicerecord component.- Returns:
- the value of the
devicerecord component
-
deviceType
Returns the value of thedeviceTyperecord component.- Returns:
- the value of the
deviceTyperecord component
-