Class HardwareItemMap
- java.lang.Object
-
- com.google.blocks.ftcrobotcontroller.hardware.HardwareItemMap
-
public class HardwareItemMap extends Object
A class that maps the supported hardware types to lists of specific hardware items.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(HardwareType hardwareType)
Returns true of this HardwareItemMap contains the givenHardwareType
.boolean
equals(Object o)
Iterable<HardwareItem>
getAllHardwareItems()
Returns a list of allHardwareItem
s in this HardwareItemMap, sorted by identifiers.List<HardwareItem>
getHardwareItems(HardwareType hardwareType)
Returns a list ofHardwareItem
s for the givenHardwareType
, sorted by device name.int
getHardwareTypeCount()
Returns the number ofHardwareType
s stored in this HardwareItemMap.Set<HardwareType>
getHardwareTypes()
Returns a set ofHardwareType
s in this HardwareItemMap.int
hashCode()
static HardwareItemMap
newHardwareItemMap()
Creates a newHardwareItemMap
with the supported hardware items in the active configuration.static HardwareItemMap
newHardwareItemMap(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
Creates a newHardwareItemMap
with the supported hardware items in the givenHardwareMap
.
-
-
-
Method Detail
-
newHardwareItemMap
public static HardwareItemMap newHardwareItemMap()
Creates a newHardwareItemMap
with the supported hardware items in the active configuration.
-
newHardwareItemMap
public static HardwareItemMap newHardwareItemMap(com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
Creates a newHardwareItemMap
with the supported hardware items in the givenHardwareMap
.
-
getHardwareTypeCount
public int getHardwareTypeCount()
Returns the number ofHardwareType
s stored in this HardwareItemMap.
-
contains
public boolean contains(HardwareType hardwareType)
Returns true of this HardwareItemMap contains the givenHardwareType
.
-
getHardwareItems
public List<HardwareItem> getHardwareItems(HardwareType hardwareType)
Returns a list ofHardwareItem
s for the givenHardwareType
, sorted by device name.
-
getAllHardwareItems
public Iterable<HardwareItem> getAllHardwareItems()
Returns a list of allHardwareItem
s in this HardwareItemMap, sorted by identifiers.
-
getHardwareTypes
public Set<HardwareType> getHardwareTypes()
Returns a set ofHardwareType
s in this HardwareItemMap.
-
-