de.unikassel.android.sdcframework.preferences
Class DevicePreferencesCollectionImpl

Package class diagram package DevicePreferencesCollectionImpl
java.lang.Object
  extended by de.unikassel.android.sdcframework.preferences.DevicePreferencesCollectionImpl
All Implemented Interfaces:
DevicePreferencesCollection

public final class DevicePreferencesCollectionImpl
extends Object
implements DevicePreferencesCollection

Implementation of a collection of device preferences.


Field Summary
private  Map<SensorDeviceIdentifier,SensorDevicePreferences> mapPreferences
          the contained sub devices of the sensor composition
 
Constructor Summary
DevicePreferencesCollectionImpl()
          Constructor
 
Method Summary
 boolean addPreferences(SensorDevicePreferences preferences)
          Method to add device preferences to the composition
 Collection<SensorDevicePreferences> getPreferences()
          Getter for all device preferences
 SensorDevicePreferences getPreferencesForDevice(SensorDeviceIdentifier deviceIdentifier)
          Getter for specific device preferences
private  Map<SensorDeviceIdentifier,SensorDevicePreferences> getPreferencesMap()
          Getter for the the preferences map
 void removeAll()
          Does remove all stored device preferences
private  void setPreferencesMap(Map<SensorDeviceIdentifier,SensorDevicePreferences> mapPreferences)
          Setter for the preferences map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapPreferences

private Map<SensorDeviceIdentifier,SensorDevicePreferences> mapPreferences
the contained sub devices of the sensor composition

Constructor Detail

DevicePreferencesCollectionImpl

public DevicePreferencesCollectionImpl()
Constructor

Method Detail

addPreferences

public final boolean addPreferences(SensorDevicePreferences preferences)
Description copied from interface: DevicePreferencesCollection
Method to add device preferences to the composition

Specified by:
addPreferences in interface DevicePreferencesCollection
Parameters:
preferences - the preferences to add
Returns:
true if successful, false otherwise

getPreferences

public Collection<SensorDevicePreferences> getPreferences()
Description copied from interface: DevicePreferencesCollection
Getter for all device preferences

Specified by:
getPreferences in interface DevicePreferencesCollection
Returns:
the preferences collection of the composite type

setPreferencesMap

private final void setPreferencesMap(Map<SensorDeviceIdentifier,SensorDevicePreferences> mapPreferences)
Setter for the preferences map

Parameters:
mapPreferences - the preferences map to set

getPreferencesMap

private final Map<SensorDeviceIdentifier,SensorDevicePreferences> getPreferencesMap()
Getter for the the preferences map

Returns:
the the preferences map

getPreferencesForDevice

public final SensorDevicePreferences getPreferencesForDevice(SensorDeviceIdentifier deviceIdentifier)
Description copied from interface: DevicePreferencesCollection
Getter for specific device preferences

Specified by:
getPreferencesForDevice in interface DevicePreferencesCollection
Parameters:
deviceIdentifier - the device identifier
Returns:
the preferences for the device with the given identifier

removeAll

public final void removeAll()
Description copied from interface: DevicePreferencesCollection
Does remove all stored device preferences

Specified by:
removeAll in interface DevicePreferencesCollection