Class AbstractProtectedList<T extends ISimpleElement>
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.AbstractProtectedList<T>
- Type Parameters:
T
- elements type
- Direct Known Subclasses:
AbstractProtectedMagnetList
,BindedList
,BPMonitorList
,DispersionDataList
,OpticsList
,PositionedDataList
,PowerSupplyList
,TransferList
Abstract list for holding DataBush elements in DataBush. Implements basic behaviour for
all cast-save readonly lists. This list is backed upon DoubleList.
- Author:
- igor@scictrl.com
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add.boolean
Returnstrue
if this list contains the specified element.get
(int i) get.get.getOwner()
Returns DataBush that owns this list.boolean
isEmpty()
Tests if this list has no elements.iterator()
This method returnsHorCorrectorIterator
of the elements in the list.iterator
(int index) This method returnsHorCorrectorIterator
of the elements in the list.iterator
(HorCorrector element) This method returnsHorCorrectorIterator
of the elements in the list.int
size()
Returns the number of elements in this list.toArray()
Returns an array containing all of the elements in this list in the correct order.ElementList
<?> toElementList.toString()
Returns a string representation of the object.
-
Field Details
-
owner
Core operation object -
dl
Elements list -
type
Elements type
-
-
Method Details
-
contains
Returnstrue
if this list contains the specified element.- Parameters:
o
- aObject
element whose presence in this List is to be tested.- Returns:
- returns
true
if list contains elemento
,false
otherwise.
-
getOwner
Returns DataBush that owns this list.- Returns:
- a
DataBush
owner of this list
-
isEmpty
public boolean isEmpty()Tests if this list has no elements.- Returns:
true
if this list has no elements,false
otherwise.
-
size
public int size()Returns the number of elements in this list.- Returns:
- the number of elements in this list
-
toArray
Returns an array containing all of the elements in this list in the correct order.- Returns:
- an array of
AbstractDataBushElement
an array containing all of the elements in this list in the correct order
-
toElementList
toElementList.
- Returns:
- a
ElementList
object
-
toString
Returns a string representation of the object. Returns string representation of all contained elements (callstoString()
on each) in correct order seperated by EOL sequence. -
get
get.
- Parameters:
i
- a int- Returns:
- a T object
-
get
get.
- Parameters:
name
- aString
object- Returns:
- a T object
-
add
add.
- Parameters:
a
- a T object- Returns:
- a boolean
-
iterator
This method returnsHorCorrectorIterator
of the elements in the list. Iteraotr starts at the begining.- Returns:
- a
Iterator
object
-
iterator
This method returnsHorCorrectorIterator
of the elements in the list. Iteraotr starts at the element with positionindex
in list.- Parameters:
index
- a int- Returns:
- a
Iterator
object
-
iterator
This method returnsHorCorrectorIterator
of the elements in the list. Iteraotr starts at the element, which is specified as parameter.- Parameters:
element
- aHorCorrector
object- Returns:
- a
Iterator
object
-