com.atlassian.confluence.util.collections
Class Range

java.lang.Object
  extended by com.atlassian.confluence.util.collections.Range
All Implemented Interfaces:
java.lang.Iterable<java.lang.Integer>

public final class Range
extends java.lang.Object
implements java.lang.Iterable<java.lang.Integer>

Represents an integer range suitable for iterating over. As is typical in Java, it is inclusive for the start value and exclusive for the end value.


Method Summary
 java.util.Iterator<java.lang.Integer> iterator()
           
static Range range(int start, int end)
          Creates a new range with a given start value (inclusive) and end value (exclusive).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

range

public static Range range(int start,
                          int end)
Creates a new range with a given start value (inclusive) and end value (exclusive).

Throws:
java.lang.IllegalArgumentException - if start is not less than or equal to end

iterator

public java.util.Iterator<java.lang.Integer> iterator()
Specified by:
iterator in interface java.lang.Iterable<java.lang.Integer>


Copyright © 2003-2014 Atlassian. All Rights Reserved.