Class DoubleList
- All Implemented Interfaces:
Iterable<Double>
,PrimitiveBeanCollection<Double>
A bean defining a list of
Double
s.
An example:
<datasets config-class="org.anchoranalysis.bean.primitive.StringList" config-factory="doubleList">
<item>1.2</item>
<item>-0.34354</item>
<item>7.2e5</item>
</datasets>
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleList
(Double... values) Constructs with one or more values added to the list. -
Method Summary
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DoubleList
Constructs with one or more values added to the list.- Parameters:
values
- the values
-
-
Method Details
-
add
Description copied from interface:PrimitiveBeanCollection
Add an element to the collection.- Specified by:
add
in interfacePrimitiveBeanCollection<Double>
- Parameters:
value
- the element to add.
-
contains
Description copied from interface:PrimitiveBeanCollection
Whether the collection contains a particular element?- Specified by:
contains
in interfacePrimitiveBeanCollection<Double>
- Parameters:
value
- the element to search for- Returns:
- true iff the collection contains the element.
-
iterator
-
isEmpty
public boolean isEmpty()Description copied from interface:PrimitiveBeanCollection
Whether the collection is empty or not.- Specified by:
isEmpty
in interfacePrimitiveBeanCollection<Double>
- Returns:
- true iff the collection contains zero elements.
-
duplicateBean
Duplicate the bean.NOTE: We need to specifically-implement it as the
AnchorBean
functionality won't work with this implementation, as it uses non-default initialization (using a config-factory).- Overrides:
duplicateBean
in classAnchorBean<DoubleList>
- Returns:
- the newly created bean
-
equals
-
canEqual
-
hashCode
public int hashCode()
-