Record Class GeolocationOptions
java.lang.Object
java.lang.Record
com.vaadin.flow.component.geolocation.GeolocationOptions
- Record Components:
enableHighAccuracy- whether to request high-accuracy position data (e.g. GPS), ornullfor the browser default (false)timeout- the maximum time in milliseconds to wait for a position, ornullfor the browser default (Infinity)maximumAge- the maximum age in milliseconds of a cached position that is acceptable, ornullfor the browser default (0)
- All Implemented Interfaces:
Serializable
public record GeolocationOptions(Boolean enableHighAccuracy, Integer timeout, Integer maximumAge)
extends Record
implements Serializable
Options for the browser's Geolocation API.
All fields are optional. When null, the browser's default values are
used.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates options with all values set tonull, meaning the browser's defaults will be used.GeolocationOptions(Boolean enableHighAccuracy, Integer timeout, Integer maximumAge) Creates an instance of aGeolocationOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenableHighAccuracyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaximumAgerecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GeolocationOptions
public GeolocationOptions()Creates options with all values set tonull, meaning the browser's defaults will be used. -
GeolocationOptions
Creates an instance of aGeolocationOptionsrecord class.- Parameters:
enableHighAccuracy- the value for theenableHighAccuracyrecord componenttimeout- the value for thetimeoutrecord componentmaximumAge- the value for themaximumAgerecord 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). -
enableHighAccuracy
Returns the value of theenableHighAccuracyrecord component.- Returns:
- the value of the
enableHighAccuracyrecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
maximumAge
Returns the value of themaximumAgerecord component.- Returns:
- the value of the
maximumAgerecord component
-