Class SequenceInteger
A sequence of integers.
The sequence will step from start
to end
with step-sizes of increment
.
There is no guarantee that end
will be included, if it doesn't align with the
step-size.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkMisconfigured
(BeanInstanceMap defaultInstances) Checks that a bean's properties conform to expectations.int
getEnd()
An index beyond which we cannot iterate (inclusive).int
Size of step to use when incrementing.int
getStart()
The index to begin iteration from.iterator()
An iterator for each element in the sequence.void
setEnd
(int end) An index beyond which we cannot iterate (inclusive).void
setIncrement
(int increment) Size of step to use when incrementing.void
setStart
(int start) The index to begin iteration from.Methods inherited from class org.anchoranalysis.bean.AnchorBean
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
SequenceInteger
public SequenceInteger()
-
-
Method Details
-
checkMisconfigured
Description copied from class:AnchorBean
Checks that a bean's properties conform to expectations.- Overrides:
checkMisconfigured
in classAnchorBean<SequenceInteger>
- Parameters:
defaultInstances
- all available default instances if theDefaultInstance
annotation is used- Throws:
BeanMisconfiguredException
- if the bean has not been configured properly as XML
-
iterator
An iterator for each element in the sequence.- Returns:
- the iterator.
-
getStart
public int getStart()The index to begin iteration from. -
setStart
public void setStart(int start) The index to begin iteration from. -
getEnd
public int getEnd()An index beyond which we cannot iterate (inclusive). -
setEnd
public void setEnd(int end) An index beyond which we cannot iterate (inclusive). -
getIncrement
public int getIncrement()Size of step to use when incrementing. -
setIncrement
public void setIncrement(int increment) Size of step to use when incrementing.
-