clojure.lang
Class Range

java.lang.Object
  extended by clojure.lang.Obj
      extended by clojure.lang.ASeq
          extended by clojure.lang.Range
All Implemented Interfaces:
IChunkedSeq, IHashEq, IMeta, IObj, IPersistentCollection, IReduce, IReduceInit, ISeq, Seqable, Sequential, Serializable, Iterable, Collection, List

public class Range
extends ASeq
implements IChunkedSeq, IReduce

Implements generic numeric (potentially infinite) range.

See Also:
Serialized Form

Method Summary
 IChunk chunkedFirst()
           
 ISeq chunkedMore()
           
 ISeq chunkedNext()
           
static ISeq create(Object end)
           
static ISeq create(Object start, Object end)
           
static ISeq create(Object start, Object end, Object step)
           
 Object first()
           
 void forceChunk()
           
 Iterator iterator()
           
 ISeq next()
           
 Object reduce(IFn f)
           
 Object reduce(IFn f, Object val)
           
 Obj withMeta(IPersistentMap meta)
           
 
Methods inherited from class clojure.lang.ASeq
add, add, addAll, addAll, clear, cons, contains, containsAll, count, empty, equals, equiv, get, hashCode, hasheq, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, more, remove, remove, removeAll, retainAll, seq, set, size, subList, toArray, toArray, toString
 
Methods inherited from class clojure.lang.Obj
meta
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface clojure.lang.ISeq
cons, more
 
Methods inherited from interface clojure.lang.IPersistentCollection
count, empty, equiv
 
Methods inherited from interface clojure.lang.Seqable
seq
 

Method Detail

create

public static ISeq create(Object end)

create

public static ISeq create(Object start,
                          Object end)

create

public static ISeq create(Object start,
                          Object end,
                          Object step)

withMeta

public Obj withMeta(IPersistentMap meta)
Specified by:
withMeta in interface IObj
Specified by:
withMeta in class Obj

first

public Object first()
Specified by:
first in interface ISeq

forceChunk

public void forceChunk()

next

public ISeq next()
Specified by:
next in interface ISeq

chunkedFirst

public IChunk chunkedFirst()
Specified by:
chunkedFirst in interface IChunkedSeq

chunkedNext

public ISeq chunkedNext()
Specified by:
chunkedNext in interface IChunkedSeq

chunkedMore

public ISeq chunkedMore()
Specified by:
chunkedMore in interface IChunkedSeq

reduce

public Object reduce(IFn f)
Specified by:
reduce in interface IReduce

reduce

public Object reduce(IFn f,
                     Object val)
Specified by:
reduce in interface IReduceInit

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface List
Overrides:
iterator in class ASeq


Copyright © 2016. All Rights Reserved.