Class GridAxisDescriptor

java.lang.Object
edu.nps.moves.dis7.pdus.GridAxisDescriptor
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GridAxisDescriptorFixed, GridAxisDescriptorVariable

public class GridAxisDescriptor extends Object implements Serializable
Detailed information about the grid dimensions (axes) and coordinates for environmental state variables
See Also:
  • Field Details

    • domainInitialXi

      protected double domainInitialXi
      coordinate of the grid origin or initial value
    • domainFinalXi

      protected double domainFinalXi
      coordinate of the endpoint or final value
    • domainPointsXi

      protected short domainPointsXi
      The number of grid points along the Xi domain axis for the enviornmental state data
    • interleafFactor

      protected byte interleafFactor
      interleaf factor along the domain axis.
    • axisType

      protected GridAxisDescriptorAxisType axisType
      type of grid axis uid 377
  • Constructor Details

    • GridAxisDescriptor

      public GridAxisDescriptor()
      Constructor creates and configures a new instance object
  • Method Details

    • getMarshalledSize

      public int getMarshalledSize()
      Returns size of this serialized (marshalled) object in bytes
      Returns:
      serialized size in bytes
      See Also:
    • setDomainInitialXi

      public GridAxisDescriptor setDomainInitialXi(double pDomainInitialXi)
      Setter for domainInitialXi
      Parameters:
      pDomainInitialXi - new value of interest
      Returns:
      same object to permit progressive setters
    • getDomainInitialXi

      public double getDomainInitialXi()
      Getter for domainInitialXi
      Returns:
      value of interest
    • setDomainFinalXi

      public GridAxisDescriptor setDomainFinalXi(double pDomainFinalXi)
      Setter for domainFinalXi
      Parameters:
      pDomainFinalXi - new value of interest
      Returns:
      same object to permit progressive setters
    • getDomainFinalXi

      public double getDomainFinalXi()
      Getter for domainFinalXi
      Returns:
      value of interest
    • setDomainPointsXi

      public GridAxisDescriptor setDomainPointsXi(short pDomainPointsXi)
      Setter for domainPointsXi
      Parameters:
      pDomainPointsXi - new value of interest
      Returns:
      same object to permit progressive setters
    • setDomainPointsXi

      public GridAxisDescriptor setDomainPointsXi(int pDomainPointsXi)
      Utility setter for domainPointsXi
      Parameters:
      pDomainPointsXi - new value of interest
      Returns:
      same object to permit progressive setters
    • getDomainPointsXi

      public short getDomainPointsXi()
      Getter for domainPointsXi
      Returns:
      value of interest
    • setInterleafFactor

      public GridAxisDescriptor setInterleafFactor(byte pInterleafFactor)
      Setter for interleafFactor
      Parameters:
      pInterleafFactor - new value of interest
      Returns:
      same object to permit progressive setters
    • setInterleafFactor

      public GridAxisDescriptor setInterleafFactor(int pInterleafFactor)
      Utility setter for interleafFactor
      Parameters:
      pInterleafFactor - new value of interest
      Returns:
      same object to permit progressive setters
    • getInterleafFactor

      public byte getInterleafFactor()
      Getter for interleafFactor
      Returns:
      value of interest
    • setAxisType

      public GridAxisDescriptor setAxisType(GridAxisDescriptorAxisType pAxisType)
      Setter for axisType
      Parameters:
      pAxisType - new value of interest
      Returns:
      same object to permit progressive setters
    • getAxisType

      public GridAxisDescriptorAxisType getAxisType()
      Getter for axisType
      Returns:
      value of interest
    • marshal

      public void marshal(DataOutputStream dos) throws Exception
      Serializes an object to a DataOutputStream.
      Parameters:
      dos - the OutputStream
      Throws:
      Exception - if something goes wrong
      See Also:
    • unmarshal

      public int unmarshal(DataInputStream dis) throws Exception
      Deserializes an object from a DataInputStream.
      Parameters:
      dis - the InputStream
      Returns:
      marshalled serialized size in bytes
      Throws:
      Exception - if something goes wrong
      See Also:
    • marshal

      public void marshal(ByteBuffer byteBuffer) throws Exception
      Packs an object into the ByteBuffer.
      Parameters:
      byteBuffer - The ByteBuffer at the position to begin writing
      Throws:
      BufferOverflowException - if byteBuffer is too small
      ReadOnlyBufferException - if byteBuffer is read only
      Exception - ByteBuffer-generated exception
      See Also:
    • unmarshal

      public int unmarshal(ByteBuffer byteBuffer) throws Exception
      Unpacks a Pdu from the underlying data.
      Parameters:
      byteBuffer - The ByteBuffer at the position to begin reading
      Returns:
      marshalled serialized size in bytes
      Throws:
      BufferUnderflowException - if byteBuffer is too small
      Exception - ByteBuffer-generated exception
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsImpl

      public boolean equalsImpl(Object obj)
      Compare all fields that contribute to the state, ignoring transient and static fields, for this and the supplied object
      Parameters:
      obj - the object to compare to
      Returns:
      true if the objects are equal, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object