java.lang.Object
java.lang.Record
org.elasticsearch.useragent.api.Details
Record Components:
name - the user-agent name (e.g. "Chrome"); null when no match
version - the pre-computed user-agent version string (e.g. "33.0.1750"); null when major was absent
os - the operating system name and version; null when no OS match
osFull - the pre-computed full OS string (e.g. "Mac OS X 10.9.2"); null when OS version was absent
device - the device name and version; null when no device match
deviceType - the device type (e.g. "Desktop", "Phone"); null when not extracted

public record Details(String name, String version, VersionedName os, String osFull, VersionedName device, String deviceType) extends Record
Parsed user-agent information.
  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @Nullable public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • version

      @Nullable public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • os

      @Nullable public VersionedName os()
      Returns the value of the os record component.
      Returns:
      the value of the os record component
    • osFull

      @Nullable public String osFull()
      Returns the value of the osFull record component.
      Returns:
      the value of the osFull record component
    • device

      @Nullable public VersionedName device()
      Returns the value of the device record component.
      Returns:
      the value of the device record component
    • deviceType

      @Nullable public String deviceType()
      Returns the value of the deviceType record component.
      Returns:
      the value of the deviceType record component