Class Range


  • public class Range
    extends java.lang.Object
    This class represents a certain range of a MadX sequence. It manages all the element in this range, the misalignments of this elements, the filters to apply (e.g. for BPM reading inversions) and knows about its definition in the JMadModelDefinition
    • Constructor Detail

      • Range

        public Range​(RangeDefinition rangeDefinition)
        The constructor.
        Parameters:
        rangeDefinition - the definition for the range.
      • Range

        public Range​(java.lang.String name)
    • Method Detail

      • addMisalignments

        public void addMisalignments​(java.util.List<MisalignmentConfiguration> misalignmentConfigurations)
        Parameters:
        misalignmentConfigurations -
      • getMisalignmentConfigurations

        public java.util.List<MisalignmentConfiguration> getMisalignmentConfigurations()
        Returns:
        all misalignments in this range
      • add

        public void add​(Element element)
        add one element
        Parameters:
        element - the element to add.
      • clear

        public void clear()
        remove all elements
      • getElement

        public Element getElement​(java.lang.String elementName)
        get the element with the specific name
        Parameters:
        elementName - the name of the element to retrieve.
        Returns:
        the element.
      • getElements

        public java.util.List<Element> getElements()
        get all elements
        Returns:
        all elements
      • getElements

        @Deprecated
        public java.util.List<Element> getElements​(JMadElementType type)
        Deprecated.
        Use getElements(Element.class)
        get all elements of a specific type.
        Parameters:
        type - the type of the elements to retrieve.
        Returns:
        a Collection of the elements.
      • getElements

        public <C extends Element> java.util.List<C> getElements​(java.lang.Class<C> elemtClass)
        Type Parameters:
        C -
        Parameters:
        elemtClass -
        Returns:
      • getElementNames

        public java.util.List<java.lang.String> getElementNames​(JMadElementType type)
        Parameters:
        type - the type for which to search the element names
        Returns:
        all element-names of the given type.
      • getName

        public java.lang.String getName()
        Returns:
        the name of the Range
      • toString

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

        public RangeDefinition getRangeDefinition()
        Returns:
        the rangeDefinition
      • addListener

        public void addListener​(RangeListener listener)
        Parameters:
        listener - the listener to add
      • removeListener

        public void removeListener​(RangeListener listener)
        Parameters:
        listener - the listener to remove