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. | |
| static String | asStringProperty (AspectPropertyValue< String > property) |
| Helper to get the value of an IP Intelligence string property. | |
| static String | asIntegerProperty (AspectPropertyValue< Integer > property) |
| Helper to get the value of an IP Intelligence integer property. | |
| static String | asFloatProperty (AspectPropertyValue< Float > property) |
| Helper to get the value of an IP Intelligence float property. | |
| static String | asIPAddressProperty (AspectPropertyValue< java.net.InetAddress > property) |
| Helper to get the value of an IP Intelligence InetAddress property. | |
| static String | asWktStringProperty (AspectPropertyValue< WktString > property) |
| Helper to get the value of an IP Intelligence WktString property. | |
| static< T > String | asString (AspectPropertyValue< T > value) |
| Generic helper to get the value of a property as a string. | |
| static< T > T | firstValue (AspectPropertyValue< T > property) |
| Helper to get the first raw value of an IP Intelligence property. | |
Static Public Attributes | |
| static final String | PRICING_MESSAGE |
| Advisory logged once when a property has no value, as this is commonly because the resource key in use does not include the property. | |
Member Function Documentation
◆ asFloatProperty()
|
static |
Helper to get the value of an IP Intelligence float property.
Handles runtime List<IWeightedValue> values due to type erasure.
◆ asIntegerProperty()
|
static |
Helper to get the value of an IP Intelligence integer property.
Handles runtime List<IWeightedValue> values due to type erasure.
◆ asIPAddressProperty()
|
static |
Helper to get the value of an IP Intelligence InetAddress property.
Handles runtime List<IWeightedValue> values due to type erasure.
◆ asString()
|
static |
Generic helper to get the value of a property as a string.
Used primarily for testing and simple property display.
- Parameters
-
value the property value <T> the type
- Returns
- a string representation of the value or a "no value" message
◆ asStringProperty()
|
static |
Helper to get the value of an IP Intelligence string property.
Handles runtime List<IWeightedValue> values due to type erasure.
◆ asWktStringProperty()
|
static |
Helper to get the value of an IP Intelligence WktString property.
Handles runtime List<IWeightedValue> values due to type erasure.
◆ firstValue()
|
static |
Helper to get the first raw value of an IP Intelligence property.
Due to Java generics type erasure, the on-premise engine may return List<IWeightedValue<T>> even when the declared type is T. This method unwraps such values and returns the first one, which is useful when the typed value is needed for further calculation rather than for display.
- Parameters
-
property the property value <T> the declared type of the property
- Returns
- the first unwrapped value, or null when there is no value
◆ tryGet()
|
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. IPIntelligenceData::getIsMobile()
- Returns
- value
Member Data Documentation
◆ PRICING_MESSAGE
|
static |
Advisory logged once when a property has no value, as this is commonly because the resource key in use does not include the property.
