public class IntegerList extends AnchorBean<IntegerList> implements PrimitiveBeanCollection<Integer>
Integer
s.
An example:
<datasets config-class="org.anchoranalysis.bean.primitive.IntegerList" config-factory="integerList">
<item>1</item>
<item>-4</item>
<item>8</item>
</datasets>
Constructor and Description |
---|
IntegerList(Integer... values)
Constructs with one or more values added to the list.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Integer value)
Add an element to the collection.
|
protected boolean |
canEqual(Object other) |
boolean |
contains(Integer value)
Whether the collection contains a particular element?
|
IntegerList |
duplicateBean()
Duplicate the bean.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEmpty()
Whether the collection is empty or not.
|
Iterator<Integer> |
iterator() |
checkMisconfigured, describeBean, describeChildren, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
forEach, spliterator
public IntegerList(Integer... values)
values
- the valuespublic void add(Integer value)
PrimitiveBeanCollection
add
in interface PrimitiveBeanCollection<Integer>
value
- the element to add.public boolean contains(Integer value)
PrimitiveBeanCollection
contains
in interface PrimitiveBeanCollection<Integer>
value
- the element to search forpublic boolean isEmpty()
PrimitiveBeanCollection
isEmpty
in interface PrimitiveBeanCollection<Integer>
public IntegerList duplicateBean()
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).
duplicateBean
in class AnchorBean<IntegerList>
protected boolean canEqual(Object other)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.