Package ucar.ma2
Class RangeComposite
- java.lang.Object
-
- ucar.ma2.RangeComposite
-
- All Implemented Interfaces:
Iterable<Integer>
,RangeIterator
@Immutable public class RangeComposite extends Object implements RangeIterator
A Composite of other RangeIterators. Iterate over them in sequence.- Since:
- 8/19/2015
-
-
Constructor Summary
Constructors Constructor Description RangeComposite(String name, List<RangeIterator> ranges)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description RangeIterator
copyWithName(String name)
Make a copy with a different name.String
getName()
The name of this Range iterator.List<RangeIterator>
getRanges()
Iterator<Integer>
iterator()
int
length()
The number of index in this iterator.RangeIterator
setName(String name)
Deprecated.use copyWithName()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
RangeComposite
public RangeComposite(String name, List<RangeIterator> ranges)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:RangeIterator
The name of this Range iterator.- Specified by:
getName
in interfaceRangeIterator
-
getRanges
public List<RangeIterator> getRanges()
-
setName
@Deprecated public RangeIterator setName(String name)
Deprecated.use copyWithName()- Specified by:
setName
in interfaceRangeIterator
-
copyWithName
public RangeIterator copyWithName(String name)
Description copied from interface:RangeIterator
Make a copy with a different name.- Specified by:
copyWithName
in interfaceRangeIterator
-
iterator
public Iterator<Integer> iterator()
- Specified by:
iterator
in interfaceIterable<Integer>
- Specified by:
iterator
in interfaceRangeIterator
-
length
public int length()
Description copied from interface:RangeIterator
The number of index in this iterator.- Specified by:
length
in interfaceRangeIterator
-
-