- 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_INPUTANALOG_OUTPUTDIGITAL_INPUTDIGITAL_OUTPUTI2CPWMSERIALSPI
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IOTypegetByConfigClass(Class<? extends IOConfig> configClass)getByConfigClass.static IOTypegetByIO(IO io)getByIO.static IOTypegetByIO(Provider provider)getByIO.static IOTypegetByIOClass(Class<? extends IO> ioClass)getByIOClass.static IOTypegetByProviderClass(Class<? extends Provider> providerClass)getByProviderClass.static IOTypegetByProviderClass(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.booleanisType(IOType type)isType.<CB extends IOConfigBuilder>
CBnewConfigBuilder(Context context)static IOTypeparse(String ioType)parse.static IOTypevalueOf(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
Classobject.
-
getConfigClass
public Class<? extends IOConfig> getConfigClass()
Getter for the field
configClass.- Returns:
- a
Classobject.
-
getConfigBuilderClass
public Class<? extends IOConfigBuilder> getConfigBuilderClass()
Getter for the field
configBuilderClass.- Returns:
- a
Classobject.
-
newConfigBuilder
public <CB extends IOConfigBuilder> CB newConfigBuilder(Context context)
-
isType
public boolean isType(IOType type)
isType.
- Parameters:
type- aIOTypeobject.- 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.
-
-