Package hec.data.rating
Class RatingInput
java.lang.Object
hec.data.rating.AbstractRatingInput
hec.data.rating.RatingInput
Defines input for a rating function.
-
Field Summary
Fields inherited from class hec.data.rating.AbstractRatingInput
CREATE_DATE, EFFECTIVE_DATE
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty invalid rating input.RatingInput
(IRatingSpecification ratingSpecification, Date ratingTime) Constructs a rating input with just the spec and rating time, i.e.RatingInput
(IRatingSpecification spec, Date ratingTime, List<Date> indepDates, List<ParameterValues> indepValues, List<String> indepUnitList, String depUnit, boolean roundDependent) Constructs a fully provisioned and valid rating input object. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of the independent input dates list, these correspond to the effective dates.Returns a copy of the independent parameter units.Returns a copy of the independent values list.Returns a list of the units.final void
setIndepdentUnitList
(List<String> unitList) Sets the units for the independent parameters.final void
setIndependentInput
(List<Date> indepDates, List<ParameterValues> indepValues) Sets the independent input to the arg values.void
validate()
A check that the input data is ready for performing a rating function.Methods inherited from class hec.data.rating.AbstractRatingInput
checkUnitAgainstParameter, getDependentUnit, getRatingSpecification, getRatingTime, getRoundOutput, setDependentUnit, setRatingSpecification, setRatingTime, setRoundOutput
-
Constructor Details
-
RatingInput
public RatingInput()Constructs an empty invalid rating input. Populate using the setters to become valid. -
RatingInput
public RatingInput(IRatingSpecification spec, Date ratingTime, List<Date> indepDates, List<ParameterValues> indepValues, List<String> indepUnitList, String depUnit, boolean roundDependent) Constructs a fully provisioned and valid rating input object. -
RatingInput
Constructs a rating input with just the spec and rating time, i.e. the rating creation date. This also creates empty independent parameter value objects.- Parameters:
ratingSpecification
-ratingTime
-
-
-
Method Details
-
validate
A check that the input data is ready for performing a rating function.- Specified by:
validate
in classAbstractRatingInput
- Throws:
DataObjectException
DataSetException
-
getIndependentValues
Returns a copy of the independent values list.- Returns:
-
getIndependentDates
Returns a copy of the independent input dates list, these correspond to the effective dates.- Returns:
-
setIndependentInput
Sets the independent input to the arg values. This will copy the values from the arg lists into internal lists.- Parameters:
indepDates
- corresponds to the effective dates.indepValues
-
-
getUnitList
Returns a list of the units. The ordered independent units are first followed by the dependent unit.- Returns:
-
setIndepdentUnitList
Sets the units for the independent parameters. This copies the unit strings from the arg list into an internal list.- Parameters:
unitList
-
-
getIndependentUnitList
Returns a copy of the independent parameter units. If there are no specified independent parameter units, then the template's parameter units are returned.- Returns:
-