Class OpticsDefinitionImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.modeldefs.domain.OpticsDefinitionImpl
-
- All Implemented Interfaces:
ModelFileDependant,OpticsDefinition,java.lang.Cloneable
public class OpticsDefinitionImpl extends java.lang.Object implements OpticsDefinition, java.lang.Cloneable
The default implementation of the Optics definition. to operate correctly it needs aModelFileFinderand some filenames.
-
-
Constructor Summary
Constructors Constructor Description OpticsDefinitionImpl()no-args constructor for XStreamOpticsDefinitionImpl(java.lang.String name, boolean overlay, ModelFile... modelFiles)OpticsDefinitionImpl(java.lang.String name, ModelFile... modelFiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPostPtcUniverseFile(ModelFile modelFile)OpticsDefinitionImplclone()booleanequals(java.lang.Object obj)java.util.List<ModelFile>getInitFiles()java.lang.StringgetName()java.lang.String[]getOpticFileNames()convenience methods to get all the relative pathnames of the required filesjava.util.List<ModelFile>getPostPtcUniverseFiles()java.util.Collection<ModelFile>getRequiredFiles()inthashCode()booleanisOverlay()java.lang.StringtoString()
-
-
-
Constructor Detail
-
OpticsDefinitionImpl
public OpticsDefinitionImpl()
no-args constructor for XStream
-
OpticsDefinitionImpl
public OpticsDefinitionImpl(java.lang.String name, ModelFile... modelFiles)
-
OpticsDefinitionImpl
public OpticsDefinitionImpl(java.lang.String name, boolean overlay, ModelFile... modelFiles)
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceOpticsDefinition- Returns:
- the name of the optics
-
getOpticFileNames
public final java.lang.String[] getOpticFileNames()
Description copied from interface:OpticsDefinitionconvenience methods to get all the relative pathnames of the required files- Specified by:
getOpticFileNamesin interfaceOpticsDefinition- Returns:
- a list of FileNames for all ModelFiles this Optic consists of
-
getRequiredFiles
public final java.util.Collection<ModelFile> getRequiredFiles()
- Specified by:
getRequiredFilesin interfaceModelFileDependant- Returns:
- all the
ModelFiles that are required by this definition-component.
-
getInitFiles
public java.util.List<ModelFile> getInitFiles()
- Specified by:
getInitFilesin interfaceOpticsDefinition- Returns:
- the
ModelFiles to call for initializing this optics
-
isOverlay
public boolean isOverlay()
- Specified by:
isOverlayin interfaceOpticsDefinition- Returns:
trueif this optics can be loaded together with another optics.falseif it is a full optics definition which in most cases should override all strengths.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getPostPtcUniverseFiles
public java.util.List<ModelFile> getPostPtcUniverseFiles()
- Specified by:
getPostPtcUniverseFilesin interfaceOpticsDefinition- Returns:
- a list of model files that must be called after switching to ptc
-
addPostPtcUniverseFile
public void addPostPtcUniverseFile(ModelFile modelFile)
-
clone
public OpticsDefinitionImpl clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-