Class RangeDefinitionImpl

  • All Implemented Interfaces:
    ModelFileDependant, RangeDefinition, java.lang.Cloneable

    public class RangeDefinitionImpl
    extends java.lang.Object
    implements RangeDefinition, java.lang.Cloneable
    this class defines a range in a sequence, by defining the first and the last element.
    • Constructor Detail

      • RangeDefinitionImpl

        public RangeDefinitionImpl()
        default constructor. Necessary for xstream
      • RangeDefinitionImpl

        public RangeDefinitionImpl​(SequenceDefinition sequenceDefinition,
                                   java.lang.String name,
                                   TwissInitialConditionsImpl twiss)
        The default constructor. creates a range, which covers the whole Sequence.
        Parameters:
        sequenceDefinition - The sequence definition to which this range belongs to
        name - the name of this range
        twiss - the initial conditions for the twiss-command in this range
      • RangeDefinitionImpl

        public RangeDefinitionImpl​(SequenceDefinition sequenceDefinition,
                                   java.lang.String name,
                                   MadxRange madxRange,
                                   TwissInitialConditionsImpl twiss)
        an alternative constructor, with the possibility to provide the name of the first and the last element.
        Parameters:
        sequenceDefinition - The sequence definition to which this range belongs to
        name - a verbose name for the range
        madxRange - the range as it has to be defined for MadX
        twiss - the initial conditions for the twiss command in this range
    • Method Detail

      • clone

        public RangeDefinitionImpl clone()
                                  throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface RangeDefinition
        Returns:
        the name
      • addMonitorInvertFilter

        public void addMonitorInvertFilter​(NameFilter filter)
        adds a filter which defines that some monitors shall be inverted
        Parameters:
        filter - the filter to add
      • addCorrectorInvertFilter

        public void addCorrectorInvertFilter​(NameFilter filter)
        adds a filter, which defines that some correctors shall be inverted.
        Parameters:
        filter - the filter to add
      • addPostUseFile

        public void addPostUseFile​(ModelFile postUseFile)
        adds a file that shall be executed after the use-command.
        Parameters:
        postUseFile - the postUseFile to add
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • setSequenceDefinition

        public void setSequenceDefinition​(SequenceDefinition sequenceDefinition)
      • setApertureDefinition

        public void setApertureDefinition​(ApertureDefinition apertureDefinition)
      • setMadxRange

        public void setMadxRange​(MadxRange madxRange)
      • getStartElementName

        public java.lang.String getStartElementName()
        Description copied from interface: RangeDefinition
        If this is non-null, then the sequence is rotated to start at the element of the given name before use.
        Specified by:
        getStartElementName in interface RangeDefinition
        Returns:
        the name of an element or null.
      • setStartElementName

        public void setStartElementName​(java.lang.String startElementName)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toStringFull

        public java.lang.String toStringFull()