Package com.thunken.beacon
Class BeaconMetaFields
java.lang.Object
com.thunken.beacon.BeaconMetaFields
public final class BeaconMetaFields extends Object
Custom collection to hold multiple BEACON meta fields and their respective values.
BeaconMetaFields
instances are shared by a BeaconParser
and all BeaconLink
instances
generated by that parser. Therefore, for the sake of consistency, the public API for this class only includes
read-only methods.
Note: the current Javadoc for this project is incomplete. We rely on Lombok to generate boilerplate code, and Lombok does not plug into Javadoc. Generated methods and constructors are not included, and the Javadoc for other methods and constructors may be incomplete. See delombok and beacon#1 for more information.
- See Also:
BeaconMetaField
-
Constructor Summary
Constructors Constructor Description BeaconMetaFields()
BeaconMetaFields(BeaconMetaFields metaFields)
BeaconMetaFields(Map<BeaconMetaField,String> map)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object object)
String
getValue(BeaconMetaField field)
Returns the value to which the specified field is mapped.Set<String>
getValues(BeaconMetaField field)
Deprecated.Meta fields are not repeatable anymore, so this method returns an immutable set containing the only value to which the specified field is mapped.int
hashCode()
boolean
isDefault(BeaconMetaField field)
Returnstrue
if the specified field is mapped to its default value.String
toString()
-
Constructor Details
-
BeaconMetaFields
public BeaconMetaFields() -
BeaconMetaFields
-
BeaconMetaFields
-
-
Method Details
-
equals
-
getValue
Returns the value to which the specified field is mapped.- Returns:
- The value to which the specified field is mapped.
- Throws:
IllegalArgumentException
- Iffield
is mapped to multiple values.NullPointerException
- Iffield
is null.
-
getValues
Deprecated.Meta fields are not repeatable anymore, so this method returns an immutable set containing the only value to which the specified field is mapped.Returns all values to which the specified field is mapped.- Returns:
- All values to which the specified field is mapped.
- Throws:
NullPointerException
- Iffield
is null.- See Also:
getValue(BeaconMetaField)
-
hashCode
public int hashCode() -
isDefault
Returnstrue
if the specified field is mapped to its default value.- Returns:
true
if the specified field is mapped to its default value.- Throws:
NullPointerException
- Iffield
is null.
-
toString
-