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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThis is the maximum possible for the progress bar.Returns the overall percent completed for this custom field.intThis 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, isRequiredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pw.chew.clickup4j.api.entities.customfields.ICustomField
getClickUp4j, getId, getName, getTimeCreated, isRequiredMethods inherited from interface pw.chew.clickup4j.api.entities.customfields.ManualProgressCustomField
getType
-
Constructor Details
-
ManualProgressCustomFieldImpl
-
-
Method Details
-
getValue
Description copied from interface:ICustomFieldReturns 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:
getValuein interfaceICustomField- Specified by:
getValuein interfaceManualProgressCustomField- Overrides:
getValuein classCustomFieldImpl- Returns:
- the value of this custom field
-
getPercentCompleted
Description copied from interface:ManualProgressCustomFieldReturns the overall percent completed for this custom field. This is essentially (ManualProgressCustomField.getValue()-ManualProgressCustomField.getStartValue()) / (ManualProgressCustomField.getEndValue()-ManualProgressCustomField.getStartValue()).- Specified by:
getPercentCompletedin interfaceManualProgressCustomField- Returns:
- The percent completed.
-
getStartValue
public int getStartValue()Description copied from interface:ManualProgressCustomFieldThis is the minimum possible for the progress bar.- Specified by:
getStartValuein interfaceManualProgressCustomField- Returns:
- The minimum value.
-
getEndValue
public int getEndValue()Description copied from interface:ManualProgressCustomFieldThis is the maximum possible for the progress bar.- Specified by:
getEndValuein interfaceManualProgressCustomField- Returns:
- The maximum value.
-