Record Class ScreenOrientationLockError

java.lang.Object
java.lang.Record
com.vaadin.flow.component.screenorientation.ScreenOrientationLockError
Record Components:
errorCode - the typed reason for the failure, never null
debugInfo - a free-form description of the failure as reported by the browser, suitable for logging; never null but possibly empty
All Implemented Interfaces:
Serializable

public record ScreenOrientationLockError(ScreenOrientationLockErrorCode errorCode, String debugInfo) extends Record implements Serializable
Describes a failed screen-orientation lock request.

The client maps the browser failure to a typed ScreenOrientationLockErrorCode before reporting it, so application code can branch on errorCode() with an exhaustive switch. debugInfo() carries the free-form browser description of the failure ? useful for log lines and bug reports, but the wording is not standardised across browsers and must not be shown to end users as-is.

Since:
25.2
See Also:
  • Constructor Details

    • ScreenOrientationLockError

      public ScreenOrientationLockError(ScreenOrientationLockErrorCode errorCode, String debugInfo)
      Creates an instance of a ScreenOrientationLockError record class.
      Parameters:
      errorCode - the value for the errorCode record component
      debugInfo - the value for the debugInfo record component
  • 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.
    • errorCode

      public ScreenOrientationLockErrorCode errorCode()
      Returns the value of the errorCode record component.
      Returns:
      the value of the errorCode record component
    • debugInfo

      public String debugInfo()
      Returns the value of the debugInfo record component.
      Returns:
      the value of the debugInfo record component