Module JNISpice
Package spice.basic

Class BodyName


  • public class BodyName
    extends IDMap
    Class BodyName represents body-name mappings that are initialized by specification of a body name.

    SPICE applications normally won't need to use this class directly; they should use the class Body instead.

    Version 2.0.0 26-DEC-2016 (NJB)

    Functional change: getName now returns the original string used to create the BodyName instance. Formerly the returned name was generated by converting the input name to an ID code, then translating that ID code to a name.

    Added deepCopy method.

    Version 1.0.0 24-AUG-2009 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String bodyName  
    • Constructor Summary

      Constructors 
      Constructor Description
      BodyName​(java.lang.String name)
      Create a new BodyName from a name string.
    • Method Summary

      Modifier and Type Method Description
      BodyName deepCopy()
      Return a deep copy of this instance.
      int getIDCode()
      Return the integer Body ID code of this BodyCode instance.The code is that associated with the name at the time of the call.
      java.lang.String getName()
      Return a deep copy of the body name associated with this ID code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bodyName

        private java.lang.String bodyName
    • Constructor Detail

      • BodyName

        public BodyName​(java.lang.String name)
        Create a new BodyName from a name string.
        Parameters:
        name - String
    • Method Detail

      • getIDCode

        public int getIDCode()
                      throws SpiceException
        Return the integer Body ID code of this BodyCode instance.The code is that associated with the name at the time of the call.
        Specified by:
        getIDCode in class IDMap
        Returns:
        IDCode
        Throws:
        SpiceException - exception
      • getName

        public java.lang.String getName()
                                 throws SpiceException
        Return a deep copy of the body name associated with this ID code.
        Specified by:
        getName in class IDMap
        Returns:
        String
        Throws:
        SpiceException - exception