public class Value extends Object
Represents a value in a value list.
Constructor and Description |
---|
Value()
Initializes a new instance of the
Value class. |
Modifier and Type | Method and Description |
---|---|
Date |
getDateValue()
Gets the actual value if it can be represented as DateTime.
|
String |
getDescription()
Gets the description of a value.
|
Duration |
getDuration()
Gets the actual value which is used to represent Duration.
|
int |
getId()
Gets the unique identifier of a value across a project.
|
int |
getNumberValue()
Gets the actual value which is used to represent integer number.
|
String |
getPhonetic()
Gets the phonetic information about custom field name.
|
String |
getStringValue()
Gets the actual value which is used to represent Text string.
|
String |
getVal()
Gets the actual value in internal representation.
|
UUID |
getValueGuid()
Gets a GUID which identifies this value among others in the entire project.
|
void |
setDateValue(Date value)
Sets the actual value if it can be represented as DateTime.
|
void |
setDescription(String value)
Sets the description of a value.
|
void |
setDuration(Duration value)
Sets the actual value which is used to represent Duration.
|
void |
setId(int value)
Sets the unique identifier of a value across a project.
|
void |
setNumberValue(int value)
Sets the actual value which is used to represent integer number.
|
void |
setPhonetic(String value)
Sets the phonetic information about custom field name.
|
void |
setStringValue(String value)
Sets the actual value which is used to represent Text string.
|
void |
setVal(String value)
Sets the actual value in internal representation.
|
public Value()
Initializes a new instance of the Value
class.
public final Date getDateValue()
Gets the actual value if it can be represented as DateTime. Default value is java.util.Date#MinValue
.
Val
(getVal()
/setVal(String)
), when you need to set the
DateTime value.
public final void setDateValue(Date value)
Sets the actual value if it can be represented as DateTime. Default value is java.util.Date#MinValue
.
Val
(getVal()
/setVal(String)
), when you need to set the
DateTime value.
value
- the actual value if it can be represented as DateTime.public final String getDescription()
Gets the description of a value.
Read/write String
.
public final void setDescription(String value)
Sets the description of a value.
Read/write String
.
value
- the description of a value.public final Duration getDuration()
Gets the actual value which is used to represent Duration.
Val
(getVal()
/setVal(String)
), when you need to set the
Duration value.
public final void setDuration(Duration value)
Sets the actual value which is used to represent Duration.
Val
(getVal()
/setVal(String)
), when you need to set the
Duration value.
value
- the actual value which is used to represent Duration.public final int getId()
Gets the unique identifier of a value across a project.
It's important to not have same identifiers for different Value
instances.
Minimal Id
(getId()
/setId(int)
) value is 1
.
public final void setId(int value)
Sets the unique identifier of a value across a project.
It's important to not have same identifiers for different Value
instances.
Minimal Id
(getId()
/setId(int)
) value is 1
.
value
- the unique identifier of a value across a project.public final int getNumberValue()
Gets the actual value which is used to represent integer number.
Val
(getVal()
/setVal(String)
), when you need to set the
Number value.
public final void setNumberValue(int value)
Sets the actual value which is used to represent integer number.
Val
(getVal()
/setVal(String)
), when you need to set the
Number value.
value
- the actual value which is used to represent integer number.public final String getPhonetic()
Gets the phonetic information about custom field name.
Read/write String
.
public final void setPhonetic(String value)
Sets the phonetic information about custom field name.
Read/write String
.
value
- the phonetic information about custom field name.public final String getStringValue()
Gets the actual value which is used to represent Text string.
Val
(getVal()
/setVal(String)
), when you need to set the Text
value.
public final void setStringValue(String value)
Sets the actual value which is used to represent Text string.
Val
(getVal()
/setVal(String)
), when you need to set the Text
value.
value
- the actual value which is used to represent Text string.public final String getVal()
Gets the actual value in internal representation. Prefer using strongly typed properties which are listed below.
If you want to set Text value prefer using strongly typed StringValue
(getStringValue()
/setStringValue(String)
) property.
If you want to set Number value prefer using strongly typed NumberValue
(getNumberValue()
/setNumberValue(int)
) property.
If you want to set Date/Start/Finish values, prefer using strongly typed DateTimeValue
(getDateTimeValueInternal()
/setDateTimeValueInternal(DateTime)
) property.
If you want to set Duration value prefer using strongly typed Duration
(getDuration()
/setDuration(Duration)
) property.
If your type wasn't listed, use Val
(getVal()
/setVal(String)
) property.
public final void setVal(String value)
Sets the actual value in internal representation. Prefer using strongly typed properties which are listed below.
If you want to set Text value prefer using strongly typed StringValue
(getStringValue()
/setStringValue(String)
) property.
If you want to set Number value prefer using strongly typed NumberValue
(getNumberValue()
/setNumberValue(int)
) property.
If you want to set Date/Start/Finish values, prefer using strongly typed DateTimeValue
(getDateTimeValueInternal()
/setDateTimeValueInternal(DateTime)
) property.
If you want to set Duration value prefer using strongly typed Duration
(getDuration()
/setDuration(Duration)
) property.
If your type wasn't listed, use Val
(getVal()
/setVal(String)
) property.
value
- the actual value in internal representation.public final UUID getValueGuid()
Gets a GUID which identifies this value among others in the entire project.