\r\n

51Degrees Device Detection Java  4.4

Device detection services for 51Degrees Pipeline

fiftyone.devicedetection.examples.shared.PropertyHelper Class Reference

Static Public Member Functions

static< T > AspectPropertyValue< T >  tryGet (Supplier< AspectPropertyValue< T >> supplier)
Try to carry out a 'get' on a property getter, and catch a PropertyMissingException to avoid the example breaking if the resource key, or data file are not configured correctly by the user. More...
static< T > String  asString (AspectPropertyValue< T > value)
Helper to get the value of a property as a string. More...

Member Function Documentation

◆ asString()

static <T> String fiftyone.devicedetection.examples.shared.PropertyHelper.asString ( AspectPropertyValue< T >   value )
static

Helper to get the value of a property as a string.

Parameters
value - the property value
<T> - the type
Returns
a string representation of the value or a "no value" message

◆ tryGet()

static <T> AspectPropertyValue<T> fiftyone.devicedetection.examples.shared.PropertyHelper.tryGet ( Supplier< AspectPropertyValue< T >>   supplier )
static

Try to carry out a 'get' on a property getter, and catch a PropertyMissingException to avoid the example breaking if the resource key, or data file are not configured correctly by the user.

Parameters
supplier - to use e.g. DeviceData::getIsMobile()
Returns
value