- java.lang.Object
-
- java.lang.Enum<IOType>
-
- com.pi4j.io.IOType
-
- All Implemented Interfaces:
Serializable
,Comparable<IOType>
public enum IOType extends Enum<IOType>
IOType class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANALOG_INPUT
ANALOG_OUTPUT
DIGITAL_INPUT
DIGITAL_OUTPUT
I2C
PWM
SERIAL
SPI
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IOType
getByConfigClass(Class<? extends IOConfig> configClass)
getByConfigClass.static IOType
getByIO(IO io)
getByIO.static IOType
getByIO(Provider provider)
getByIO.static IOType
getByIOClass(Class<? extends IO> ioClass)
getByIOClass.static IOType
getByProviderClass(Class<? extends Provider> providerClass)
getByProviderClass.static IOType
getByProviderClass(String name)
getByProviderClass.Class<? extends IOConfigBuilder>
getConfigBuilderClass()
Getter for the fieldconfigBuilderClass
.Class<? extends IOConfig>
getConfigClass()
Getter for the fieldconfigClass
.static Class<? extends IOConfig>
getConfigClass(IOType type)
Getter for the fieldconfigClass
.Class<? extends IO>
getIOClass()
getIOClass.static Class<? extends IO>
getIOClass(IOType type)
getIOClass.Class<? extends Provider>
getProviderClass()
Getter for the fieldproviderClass
.static Class<? extends Provider>
getProviderClass(IOType type)
Getter for the fieldproviderClass
.boolean
isType(IOType type)
isType.<CB extends IOConfigBuilder>
CBnewConfigBuilder(Context context)
static IOType
parse(String ioType)
parse.static IOType
valueOf(String name)
Returns the enum constant of this type with the specified name.static IOType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANALOG_INPUT
public static final IOType ANALOG_INPUT
-
ANALOG_OUTPUT
public static final IOType ANALOG_OUTPUT
-
DIGITAL_INPUT
public static final IOType DIGITAL_INPUT
-
DIGITAL_OUTPUT
public static final IOType DIGITAL_OUTPUT
-
PWM
public static final IOType PWM
-
I2C
public static final IOType I2C
-
SPI
public static final IOType SPI
-
SERIAL
public static final IOType SERIAL
-
-
Method Detail
-
values
public static IOType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (IOType c : IOType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IOType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getProviderClass
public Class<? extends Provider> getProviderClass()
Getter for the field
providerClass
.- Returns:
- a
Class
object.
-
getConfigClass
public Class<? extends IOConfig> getConfigClass()
Getter for the field
configClass
.- Returns:
- a
Class
object.
-
getConfigBuilderClass
public Class<? extends IOConfigBuilder> getConfigBuilderClass()
Getter for the field
configBuilderClass
.- Returns:
- a
Class
object.
-
newConfigBuilder
public <CB extends IOConfigBuilder> CB newConfigBuilder(Context context)
-
isType
public boolean isType(IOType type)
isType.
- Parameters:
type
- aIOType
object.- Returns:
- a boolean.
-
getProviderClass
public static Class<? extends Provider> getProviderClass(IOType type)
Getter for the field
providerClass
.
-
getConfigClass
public static Class<? extends IOConfig> getConfigClass(IOType type)
Getter for the field
configClass
.
-
getByProviderClass
public static IOType getByProviderClass(Class<? extends Provider> providerClass)
getByProviderClass.
-
getByConfigClass
public static IOType getByConfigClass(Class<? extends IOConfig> configClass)
getByConfigClass.
-
-