Package ucar.ma2
Class RangeScatter
- java.lang.Object
-
- ucar.ma2.RangeScatter
-
- All Implemented Interfaces:
Iterable<Integer>
,RangeIterator
@Immutable public class RangeScatter extends Object implements RangeIterator
A Range of indices describes by a list, rather than start:stop:stride. Issues: ucar.ma2.Index- Since:
- 8/12/2015
-
-
Constructor Summary
Constructors Constructor Description RangeScatter(String name, int... val)
Ctor
-
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.boolean
equals(Object o)
String
getName()
The name of this Range iterator.int
hashCode()
Iterator<Integer>
iterator()
int
length()
The number of index in this iterator.RangeIterator
setName(String name)
Deprecated.use copyWithName()String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
RangeScatter
public RangeScatter(String name, int... val)
Ctor- Parameters:
name
- optional nameval
- should be sorted
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:RangeIterator
The name of this Range iterator.- Specified by:
getName
in interfaceRangeIterator
-
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
-
length
public int length()
Description copied from interface:RangeIterator
The number of index in this iterator.- Specified by:
length
in interfaceRangeIterator
-
-