Class SequenceInteger


public class SequenceInteger extends AnchorBean<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 Details

    • SequenceInteger

      public SequenceInteger()
  • Method Details

    • checkMisconfigured

      public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
      Description copied from class: AnchorBean
      Checks that a bean's properties conform to expectations.
      Overrides:
      checkMisconfigured in class AnchorBean<SequenceInteger>
      Parameters:
      defaultInstances - all available default instances if the DefaultInstance annotation is used
      Throws:
      BeanMisconfiguredException - if the bean has not been configured properly as XML
    • iterator

      public Iterator<Integer> 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.