Module JNISpice
Package spice.basic

Class InstrumentName


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

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

    Version 2.0.0 26-DEC-2016 (NJB)

    Functional change: the getName method now returns a copy of the String value used to create the instance. Previously the name was generated by converting the instance's name field to an ID, then converting the ID back to a name. Added deepCopy method.

    Version 1.0.0 25-AUG-2009 (NJB)

    • Field Summary

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

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

      Modifier and Type Method Description
      InstrumentName deepCopy()
      Return a deep copy of this instance.
      int getIDCode()
      Return the integer Instrument ID code of this InstrumentCode instance.The code is that associated with the name at the time of the call.
      java.lang.String getName()
      Return the instrument name associated with this ID code.The name is obtained by mapping the stored name to an ID code, then mapping that code to a name.
      • Methods inherited from class java.lang.Object

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

      • instrumentName

        private java.lang.String instrumentName
    • Constructor Detail

      • InstrumentName

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

      • getIDCode

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

        public java.lang.String getName()
                                 throws SpiceException
        Return the instrument name associated with this ID code.The name is obtained by mapping the stored name to an ID code, then mapping that code to a name.
        Specified by:
        getName in class IDMap
        Returns:
        String
        Throws:
        SpiceException - exception