Package com.zebra.bluetooth.btinsightlib
Class BtGenericEventAttribute<T>
- java.lang.Object
-
- com.zebra.bluetooth.btinsightlib.BtEventAttribute
-
- com.zebra.bluetooth.btinsightlib.BtGenericEventAttribute<T>
-
- Type Parameters:
T
- type of event data. See alsoBtConnectionEvent
BtBondStateEvent
etc.,
- All Implemented Interfaces:
android.os.Parcelable
public class BtGenericEventAttribute<T> extends BtEventAttribute
Generic class template for any type of event data that shall be provided to clients
-
-
Field Summary
Fields Modifier and Type Field Description private T
data
-
Fields inherited from class com.zebra.bluetooth.btinsightlib.BtEventAttribute
CREATOR
-
-
Constructor Summary
Constructors Constructor Description BtGenericEventAttribute(android.os.Parcel source)
Constructor accepts Parcel object as parameterBtGenericEventAttribute(T _data)
Constructor accepts T object as parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
boolean
isValid()
Check if the data is valid to use or notT
toEvent()
Get the type of data object which contain event specific informationvoid
writeToParcel(android.os.Parcel dest, int flags)
-
-
-
Field Detail
-
data
private T data
-
-
Constructor Detail
-
BtGenericEventAttribute
public BtGenericEventAttribute(@NonNull T _data)
Constructor accepts T object as parameter- Parameters:
_data
- T : Event type class object can be passed. SeeBtBondStateEvent
BtConnectionEvent
-
BtGenericEventAttribute
public BtGenericEventAttribute(@NonNull android.os.Parcel source)
Constructor accepts Parcel object as parameter- Parameters:
source
- Parcel : Parcel object is passed
-
-
Method Detail
-
describeContents
public int describeContents()
-
toEvent
public T toEvent()
Get the type of data object which contain event specific information- Returns:
- reference to T type object
-
isValid
public boolean isValid()
Check if the data is valid to use or not- Returns:
- true, if the data is valid. false otherwise.
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
-
-