Class UnitGeneratorDimensionNameSpace

java.lang.Object
com.softsynth.jmsl.jsyn2.UnitGeneratorDimensionNameSpace
All Implemented Interfaces:
DimensionNameSpace

public class UnitGeneratorDimensionNameSpace
extends java.lang.Object
implements DimensionNameSpace
  • Constructor Summary

    Constructors
    Constructor Description
    UnitGeneratorDimensionNameSpace​(java.lang.String unitGeneratorClassname)  
    UnitGeneratorDimensionNameSpace​(java.lang.String unitGeneratorClassname, int preset)  
  • Method Summary

    Modifier and Type Method Description
    int dimension()  
    java.util.Enumeration dimensionNames()  
    double getDefault​(int dim)  
    int getDimension​(java.lang.String name)  
    java.lang.String getDimensionName​(int dim)  
    double getHighLimit​(int dim)
    return highest allowable value for specified dimension
    double getLowLimit​(int dim)
    return lowest allowable value for specified dimension
    int getNumberOfNames()  
    boolean hasAmplitudePort()  
    boolean hasFrequencyPort()  
    static void main​(java.lang.String[] args)  
    void setDefault​(int dim, double value)
    set the default value for a dimension
    void setDimensionName​(int dim, java.lang.String name)
    assign a name to a dimension
    void setLimits​(int dim, double low, double high)
    set the lowest and highest limits for a dimension

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • UnitGeneratorDimensionNameSpace

      public UnitGeneratorDimensionNameSpace​(java.lang.String unitGeneratorClassname)
    • UnitGeneratorDimensionNameSpace

      public UnitGeneratorDimensionNameSpace​(java.lang.String unitGeneratorClassname, int preset)
  • Method Details

    • getNumberOfNames

      public int getNumberOfNames()
      Specified by:
      getNumberOfNames in interface DimensionNameSpace
      Returns:
      number of names stored in name space. Not the same as highest dimension. Not all dimensions require names.
    • dimension

      public int dimension()
      Specified by:
      dimension in interface DimensionNameSpace
      Returns:
      number of dimensions. Useful if you are allocating an array for example
    • getDimensionName

      public java.lang.String getDimensionName​(int dim)
      Specified by:
      getDimensionName in interface DimensionNameSpace
      Returns:
      name of specified dimension
    • getDimension

      public int getDimension​(java.lang.String name)
      Specified by:
      getDimension in interface DimensionNameSpace
      Returns:
      dimension associated with name or -1
    • setDimensionName

      public void setDimensionName​(int dim, java.lang.String name)
      assign a name to a dimension
      Specified by:
      setDimensionName in interface DimensionNameSpace
    • getLowLimit

      public double getLowLimit​(int dim)
      return lowest allowable value for specified dimension
      Specified by:
      getLowLimit in interface DimensionNameSpace
      Returns:
      lowest allowable value for specified dimension
    • getHighLimit

      public double getHighLimit​(int dim)
      return highest allowable value for specified dimension
      Specified by:
      getHighLimit in interface DimensionNameSpace
      Returns:
      highest allowable value for specified dimension
    • setLimits

      public void setLimits​(int dim, double low, double high)
      set the lowest and highest limits for a dimension
      Specified by:
      setLimits in interface DimensionNameSpace
    • setDefault

      public void setDefault​(int dim, double value)
      Description copied from interface: DimensionNameSpace
      set the default value for a dimension
      Specified by:
      setDefault in interface DimensionNameSpace
    • getDefault

      public double getDefault​(int dim)
      Specified by:
      getDefault in interface DimensionNameSpace
      Returns:
      default value for specified dimension
    • dimensionNames

      public java.util.Enumeration dimensionNames()
      Specified by:
      dimensionNames in interface DimensionNameSpace
    • hasFrequencyPort

      public boolean hasFrequencyPort()
    • hasAmplitudePort

      public boolean hasAmplitudePort()
    • main

      public static void main​(java.lang.String[] args)