Enum Class ProximityPeriod
- All Implemented Interfaces:
Serializable
,Comparable<ProximityPeriod>
,Constable
Enum representing the integration period of the Canandcolor's proximity sensor IC.
This determines how long the proximity sensor spends collecting reflected IR light to determine a proximity reading, which also determines the sample rate. Longer integration periods increase sensitivity but shorter integration periods have faster sample rates.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ProximityPeriod
fromIndex
(int idx) Returns a corresponding enum from the index.int
getIndex()
Gets the corresponding index for the value in question.static ProximityPeriod
Returns the enum constant of this class with the specified name.static ProximityPeriod[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
k5ms
5 millisecond update period. -
k10ms
10 millisecond update period. -
k20ms
20 millisecond update period. -
k40ms
40 millisecond update period.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromIndex
Returns a corresponding enum from the index.- Parameters:
idx
- the index to fetch.- Returns:
- a valid enum. If the index value is invalid it will return the default.
-
getIndex
public int getIndex()Gets the corresponding index for the value in question.- Returns:
- the index value for the enum (used internally)
-