Package hec.data.rating
Class ReverseRatingInput
java.lang.Object
hec.data.rating.AbstractRatingInput
hec.data.rating.ReverseRatingInput
Describes input for a reverse rating function. This requires that the
specification be a simple 1 independent parameter : 1 dependent parameter
rating.
-
Field Summary
Fields inherited from class hec.data.rating.AbstractRatingInput
CREATE_DATE, EFFECTIVE_DATE -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty invalid reverse rating input object.ReverseRatingInput(IRatingSpecification ratingSpecification, Date ratingTime) Constructs a reverse rating input object for the given spec and rating time, i.e.ReverseRatingInput(IRatingSpecification spec, Date ratingTime, List<Date> depDates, ParameterValues depValues, String depUnit, String indepUnit, boolean roundDependent) Constructs a valid fully provisioned reverse rating input object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the dependent dates, i.e.Returns the dependent parameter values.Returns the units for the rating function, independent units followed by dependent units.final voidsetDependentInput(List<Date> depDates, ParameterValues depValues) Sets the dependent parameter values and dates (i.e.final voidsetIndependentUnit(String indepUnit) Sets the independent unit to the arg value.voidvalidate()Validates this reverse rating input throwing an exception if it cannot be used to perform a reverse rating function.Methods inherited from class hec.data.rating.AbstractRatingInput
checkUnitAgainstParameter, getDependentUnit, getRatingSpecification, getRatingTime, getRoundOutput, setDependentUnit, setRatingSpecification, setRatingTime, setRoundOutput
-
Constructor Details
-
ReverseRatingInput
public ReverseRatingInput()Constructs an empty invalid reverse rating input object. Use the setters to build a populated valid object. -
ReverseRatingInput
Constructs a reverse rating input object for the given spec and rating time, i.e. rating creation date. This constructor will also build and empty dependent parameter values using the rating spec.- Parameters:
ratingSpecification-ratingTime-
-
ReverseRatingInput
public ReverseRatingInput(IRatingSpecification spec, Date ratingTime, List<Date> depDates, ParameterValues depValues, String depUnit, String indepUnit, boolean roundDependent) Constructs a valid fully provisioned reverse rating input object.- Parameters:
spec-ratingTime-depDates-depValues-depUnit-indepUnit-roundDependent-
-
-
Method Details
-
setDependentInput
Sets the dependent parameter values and dates (i.e. effective dates) to the arg values.- Parameters:
depDates-depValues-
-
validate
Validates this reverse rating input throwing an exception if it cannot be used to perform a reverse rating function.- Specified by:
validatein classAbstractRatingInput- Throws:
DataSetException
-
getDependentValues
Returns the dependent parameter values.- Returns:
-
getUnitList
Returns the units for the rating function, independent units followed by dependent units.- Returns:
-
getDependentDates
Returns the dependent dates, i.e. effective dates, associated with the dependent parameter values double array.- Returns:
-
setIndependentUnit
Sets the independent unit to the arg value.- Parameters:
indepUnit-
-