- java.lang.Object
-
- java.lang.Enum<PullResistance>
-
- com.pi4j.io.gpio.digital.PullResistance
-
- All Implemented Interfaces:
Serializable
,Comparable<PullResistance>
public enum PullResistance extends Enum<PullResistance>
Digital Pin Pull Resistance Enumerations- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EnumSet<PullResistance>
all()
all.String
getName()
Getter for the fieldname
.int
getValue()
Getter for the fieldvalue
.static PullResistance
parse(String pull)
parse.String
toString()
static PullResistance
valueOf(String name)
Returns the enum constant of this type with the specified name.static PullResistance[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFF
public static final PullResistance OFF
-
PULL_DOWN
public static final PullResistance PULL_DOWN
-
PULL_UP
public static final PullResistance PULL_UP
-
-
Method Detail
-
values
public static PullResistance[] 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 (PullResistance c : PullResistance.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PullResistance 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
-
getValue
public int getValue()
Getter for the field
value
.- Returns:
- a int.
-
toString
public String toString()
- Overrides:
toString
in classEnum<PullResistance>
-
all
public static EnumSet<PullResistance> all()
all.
- Returns:
- a
EnumSet
object.
-
parse
public static PullResistance parse(String pull)
parse.
- Parameters:
pull
- aString
object.- Returns:
- a
PullResistance
object.
-
-