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 aModelFileFinder
and 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 void
addPostPtcUniverseFile(ModelFile modelFile)
OpticsDefinitionImpl
clone()
boolean
equals(java.lang.Object obj)
java.util.List<ModelFile>
getInitFiles()
java.lang.String
getName()
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()
int
hashCode()
boolean
isOverlay()
java.lang.String
toString()
-
-
-
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:
getName
in interfaceOpticsDefinition
- Returns:
- the name of the optics
-
getOpticFileNames
public final java.lang.String[] getOpticFileNames()
Description copied from interface:OpticsDefinition
convenience methods to get all the relative pathnames of the required files- Specified by:
getOpticFileNames
in interfaceOpticsDefinition
- Returns:
- a list of FileNames for all ModelFiles this Optic consists of
-
getRequiredFiles
public final java.util.Collection<ModelFile> getRequiredFiles()
- Specified by:
getRequiredFiles
in interfaceModelFileDependant
- Returns:
- all the
ModelFile
s that are required by this definition-component.
-
getInitFiles
public java.util.List<ModelFile> getInitFiles()
- Specified by:
getInitFiles
in interfaceOpticsDefinition
- Returns:
- the
ModelFile
s to call for initializing this optics
-
isOverlay
public boolean isOverlay()
- Specified by:
isOverlay
in interfaceOpticsDefinition
- Returns:
true
if this optics can be loaded together with another optics.false
if it is a full optics definition which in most cases should override all strengths.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPostPtcUniverseFiles
public java.util.List<ModelFile> getPostPtcUniverseFiles()
- Specified by:
getPostPtcUniverseFiles
in 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:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-