Package hec.model

Class StreamJunction

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable, Comparable, Observer, Modifiable

public class StreamJunction extends NamedType implements AsciiSerializable, Serializable
Node connectivity objects for Stream Alignment
See Also:
  • Constructor Details

    • StreamJunction

      public StreamJunction()
    • StreamJunction

      public StreamJunction(StreamAlignmentIfc a)
  • Method Details

    • getOutflowingStreamSegments

      public int getOutflowingStreamSegments(Vector vec)
    • getOutflowingStreams

      public int getOutflowingStreams(Vector vec)
    • getInflowingStreams

      public int getInflowingStreams(Vector vec)
    • setAlignment

      public void setAlignment(StreamAlignmentNodeIfc a)
    • getIndex

      public int getIndex()
      Description copied from class: NamedType
      Return the index of the NamedType as an int.
      Overrides:
      getIndex in class NamedType
    • setIndex

      public void setIndex(int id)
      Overrides:
      setIndex in class NamedType
    • contains

      public boolean contains(StreamElement reach)
    • getNodeVector

      public Vector getNodeVector()
    • getOutflowingNodes

      public List getOutflowingNodes()
      get a List of outflow nodes held by this junction
      Returns:
      a List of outflow StreamNodes
    • addNode

      public void addNode(StreamNode n)
    • removeNode

      public void removeNode(StreamNode n)
    • removeAllNodes

      public void removeAllNodes()
    • readData

      public boolean readData(BufferedReader input)
    • writeData

      public boolean writeData(BufferedWriter out)
    • getLocation

      public WorldPt getLocation()
    • getNodeOnStream

      public StreamNode getNodeOnStream(StreamElement elem)
    • updateLocation

      public void updateLocation()
      set location of connected reach endpoints
    • getFieldObject

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Overrides:
      getFieldObject in class NamedType
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Overrides:
      setFieldObject in class NamedType
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful
    • loadId

      public boolean loadId()
    • locked

      public void locked(LockEvent event)