Class ManualProgressCustomFieldImpl
java.lang.Object
pw.chew.clickup4j.internal.entities.customfields.CustomFieldImpl
pw.chew.clickup4j.internal.entities.customfields.ManualProgressCustomFieldImpl
- All Implemented Interfaces:
ICustomField
,ManualProgressCustomField
public class ManualProgressCustomFieldImpl
extends CustomFieldImpl
implements ManualProgressCustomField
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
This is the maximum possible for the progress bar.Returns the overall percent completed for this custom field.int
This is the minimum possible for the progress bar.getValue()
Returns the value of this custom field.Methods inherited from class pw.chew.clickup4j.internal.entities.customfields.CustomFieldImpl
getClickUp4j, getId, getName, getTimeCreated, getType, isRequired
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface pw.chew.clickup4j.api.entities.customfields.ICustomField
getClickUp4j, getId, getName, getTimeCreated, isRequired
Methods inherited from interface pw.chew.clickup4j.api.entities.customfields.ManualProgressCustomField
getType
-
Constructor Details
-
ManualProgressCustomFieldImpl
-
-
Method Details
-
getValue
Description copied from interface:ICustomField
Returns the value of this custom field.It's highly recommended to cast this value to the appropriate type, because it returns more appropriate data. For example, if the custom field is of type
CustomFieldType.TEXT
, you can cast the value toTextCustomField
, this class can be found usingCustomFieldType.getAssociatedClass()
.This will be null under the following circumstances:
- No value is specified.
- The task response did not contain a
value
. Notably when an individual task is retrieved.
- Specified by:
getValue
in interfaceICustomField
- Specified by:
getValue
in interfaceManualProgressCustomField
- Overrides:
getValue
in classCustomFieldImpl
- Returns:
- the value of this custom field
-
getPercentCompleted
Description copied from interface:ManualProgressCustomField
Returns the overall percent completed for this custom field. This is essentially (ManualProgressCustomField.getValue()
-ManualProgressCustomField.getStartValue()
) / (ManualProgressCustomField.getEndValue()
-ManualProgressCustomField.getStartValue()
).- Specified by:
getPercentCompleted
in interfaceManualProgressCustomField
- Returns:
- The percent completed.
-
getStartValue
public int getStartValue()Description copied from interface:ManualProgressCustomField
This is the minimum possible for the progress bar.- Specified by:
getStartValue
in interfaceManualProgressCustomField
- Returns:
- The minimum value.
-
getEndValue
public int getEndValue()Description copied from interface:ManualProgressCustomField
This is the maximum possible for the progress bar.- Specified by:
getEndValue
in interfaceManualProgressCustomField
- Returns:
- The maximum value.
-