Package hec.rss.model
Class Channel
java.lang.Object
hec.rss.model.Channel
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,Serializable
- Direct Known Subclasses:
CircularChannel,EightPointChannel,TrapezoidalChannel
Channel is a parent class for classes describing channels for
routing methods.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected doubleprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract doublegetCelerity(double depth) abstract doublegetDepth(double flow) getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.doublevoidgetLength(hec.data.ParamDouble pd) doublegetSlope()abstract doublegetTopWidth(double depth) intbooleanisValid()Checks if parameter values are valid for this channel.voidsetchannelLength(hec.data.ParamDouble pd) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetLength(double length) voidsetSlope(double slope) voidsetUnitSystem(int unitSystem)
-
Field Details
-
_length
protected double _length -
_slope
protected double _slope -
_unitSystem
protected int _unitSystem
-
-
Constructor Details
-
Channel
public Channel()
-
-
Method Details
-
getLength
public double getLength() -
getSlope
public double getSlope() -
setLength
public void setLength(double length) -
setSlope
public void setSlope(double slope) -
getLength
public void getLength(hec.data.ParamDouble pd) -
setchannelLength
public void setchannelLength(hec.data.ParamDouble pd) -
getUnitSystem
public int getUnitSystem() -
setUnitSystem
public void setUnitSystem(int unitSystem) -
getChannelType
-
isValid
Checks if parameter values are valid for this channel.- Returns:
- true, if parameters are valid, otherwise false.
- Throws:
InvalidStateException
-
getCelerity
public abstract double getCelerity(double depth) -
getTopWidth
public abstract double getTopWidth(double depth) -
getDepth
public abstract double getDepth(double flow) -
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-