net.minecraftforge.common
Class Property
java.lang.Object
net.minecraftforge.common.Property
public class Property
- extends Object
Method Summary |
boolean |
getBoolean(boolean _default)
Returns the value in this property as a boolean,
if the value is not a valid boolean, it will return the
provided default. |
int |
getInt()
Returns the value in this property as a integer,
if the value is not a valid integer, it will return -1. |
int |
getInt(int _default)
Returns the value in this property as a integer,
if the value is not a valid integer, it will return the
provided default. |
String |
getName()
|
boolean |
isBooleanValue()
Checks if the current value held by this property is a valid boolean value. |
boolean |
isIntValue()
Checks if the current value stored in this property can be converted to an integer. |
void |
setName(String name)
|
value
public String value
comment
public String comment
Property
public Property()
Property
public Property(String name,
String value,
Property.Type type)
getInt
public int getInt()
- Returns the value in this property as a integer,
if the value is not a valid integer, it will return -1.
- Returns:
- The value
getInt
public int getInt(int _default)
- Returns the value in this property as a integer,
if the value is not a valid integer, it will return the
provided default.
- Parameters:
_default
- The default to provide if the current value is not a valid integer
- Returns:
- The value
isIntValue
public boolean isIntValue()
- Checks if the current value stored in this property can be converted to an integer.
- Returns:
- True if the vslue can be converted to an integer
getBoolean
public boolean getBoolean(boolean _default)
- Returns the value in this property as a boolean,
if the value is not a valid boolean, it will return the
provided default.
- Parameters:
_default
- The default to provide
- Returns:
- The value as a boolean, or the default
isBooleanValue
public boolean isBooleanValue()
- Checks if the current value held by this property is a valid boolean value.
- Returns:
- True if it is a boolean value
getName
public String getName()
setName
public void setName(String name)