Class Range
- java.lang.Object
-
- cern.accsoft.steering.jmad.domain.machine.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 theJMadModelDefinition
-
-
Constructor Summary
Constructors Constructor Description Range(RangeDefinition rangeDefinition)
The constructor.Range(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(Element element)
add one elementvoid
addListener(RangeListener listener)
void
addMisalignment(MisalignmentConfiguration misalignmentConfiguration)
void
addMisalignments(java.util.List<MisalignmentConfiguration> misalignmentConfigurations)
void
clear()
remove all elementsjava.util.List<NameFilter>
getCorrectorInvertFilters()
Element
getElement(java.lang.String elementName)
get the element with the specific namejava.util.List<java.lang.String>
getElementNames(JMadElementType type)
java.util.List<Element>
getElements()
get all elementsjava.util.List<Element>
getElements(JMadElementType type)
Deprecated.Use getElements(Element.class)<C extends Element>
java.util.List<C>getElements(java.lang.Class<C> elemtClass)
java.util.List<MisalignmentConfiguration>
getMisalignmentConfigurations()
java.util.List<NameFilter>
getMonitorInvertFilters()
java.lang.String
getName()
RangeDefinition
getRangeDefinition()
void
removeListener(RangeListener listener)
java.lang.String
toString()
-
-
-
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
-
addMisalignment
public void addMisalignment(MisalignmentConfiguration misalignmentConfiguration)
- Parameters:
misalignmentConfiguration
- theMisalignmentConfiguration
to add
-
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
-
getCorrectorInvertFilters
public final java.util.List<NameFilter> getCorrectorInvertFilters()
- Returns:
- the filters for all correctors to invert.
- See Also:
RangeDefinitionImpl.getCorrectorInvertFilters()
-
getMonitorInvertFilters
public final java.util.List<NameFilter> getMonitorInvertFilters()
- Returns:
- the filters for monitors to invert
- See Also:
RangeDefinitionImpl.getMonitorInvertFilters()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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
-
-