-
public class Beacon.Builder
Builder class for Beacon objects. Provides a convenient way to set the various fields of a Beacon
Example:
Beacon beacon = new Beacon.Builder() .setId1("2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6") .setId2("1") .setId3("2") .build();
-
-
Constructor Summary
Constructors Constructor Description Beacon.Builder()
Creates a builder instance
-
Method Summary
Modifier and Type Method Description Beacon
build()
Builds an instance of this beacon based on parameters set in the Builder Beacon.Builder
copyBeaconFields(Beacon beacon)
Beacon.Builder
setIdentifiers(List<Identifier> identifiers)
Beacon.Builder
setId1(String id1String)
Convenience method allowing the first beacon identifier to be set as a String. Beacon.Builder
setId2(String id2String)
Convenience method allowing the second beacon identifier to be set as a String. Beacon.Builder
setId3(String id3String)
Convenience method allowing the third beacon identifier to be set as a String. Beacon.Builder
setRssi(int rssi)
Beacon.Builder
setRunningAverageRssi(double rssi)
Beacon.Builder
setTxPower(int txPower)
Beacon.Builder
setBeaconTypeCode(int beaconTypeCode)
Beacon.Builder
setServiceUuid(int serviceUuid)
Beacon.Builder
setServiceUuid128Bit(Array<byte> serviceUuid128Bit)
Beacon.Builder
setBluetoothAddress(String bluetoothAddress)
Beacon.Builder
setDataFields(List<Long> dataFields)
Beacon.Builder
setExtraDataFields(List<Long> extraDataFields)
Beacon.Builder
setManufacturer(int manufacturer)
Beacon.Builder
setBluetoothName(String name)
Beacon.Builder
setParserIdentifier(String id)
Beacon.Builder
setMultiFrameBeacon(boolean multiFrameBeacon)
-
-
Method Detail
-
copyBeaconFields
Beacon.Builder copyBeaconFields(Beacon beacon)
- Parameters:
beacon
- the beacon whose fields we should copy to this beacon builder
-
setIdentifiers
Beacon.Builder setIdentifiers(List<Identifier> identifiers)
- Parameters:
identifiers
- identifiers to set
-
setId1
Beacon.Builder setId1(String id1String)
Convenience method allowing the first beacon identifier to be set as a String. It will be parsed into an Identifier object
- Parameters:
id1String
- string to parse into an identifier
-
setId2
Beacon.Builder setId2(String id2String)
Convenience method allowing the second beacon identifier to be set as a String. It will be parsed into an Identifier object
- Parameters:
id2String
- string to parse into an identifier
-
setId3
Beacon.Builder setId3(String id3String)
Convenience method allowing the third beacon identifier to be set as a String. It will be parsed into an Identifier object
- Parameters:
id3String
- string to parse into an identifier
-
setRssi
Beacon.Builder setRssi(int rssi)
-
setRunningAverageRssi
Beacon.Builder setRunningAverageRssi(double rssi)
-
setTxPower
Beacon.Builder setTxPower(int txPower)
-
setBeaconTypeCode
Beacon.Builder setBeaconTypeCode(int beaconTypeCode)
-
setServiceUuid
Beacon.Builder setServiceUuid(int serviceUuid)
-
setServiceUuid128Bit
Beacon.Builder setServiceUuid128Bit(Array<byte> serviceUuid128Bit)
-
setBluetoothAddress
Beacon.Builder setBluetoothAddress(String bluetoothAddress)
-
setDataFields
Beacon.Builder setDataFields(List<Long> dataFields)
-
setExtraDataFields
Beacon.Builder setExtraDataFields(List<Long> extraDataFields)
-
setManufacturer
Beacon.Builder setManufacturer(int manufacturer)
-
setBluetoothName
Beacon.Builder setBluetoothName(String name)
-
setParserIdentifier
Beacon.Builder setParserIdentifier(String id)
-
setMultiFrameBeacon
Beacon.Builder setMultiFrameBeacon(boolean multiFrameBeacon)
-
-
-
-