| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final long | |
| private final long | |
| private final long | |
| public static final PyType |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PyObject | __getitem__(PyObject
the key to lookup in this container. index)Overrides org. Equivalent to the standard Python __getitem__ method. |
| public PyObject | __iter__()
Overrides org. Return an iterator that is used to iterate the element of this sequence. |
| public int | __len__()
Overrides org. Equivalent to the standard Python __len__ method. |
| public PyObject | |
| public Object | __tojava__(Class<?>
the Class to convert this c)PyObject to.Overrides org. Equivalent to the Jython __tojava__ method. |
| pack-priv static int | Returns: int length of rangeint value lo, long int value hi, long int value (> 0) step)Return number of items in range/xrange (lo, hi, step). |
| protected PyObject | getslice(int
the position of the first element. start, int one more than the position of the last element. stop, int the step size. step)Implements abstract org. Returns a range of elements from the sequence. |
| protected PyObject | pyget(int
index of element to return. i)Implements abstract org. Returns the element of the sequence at the given index. |
| private final PyXRangeIter | |
| private final PyXRangeIter | |
| protected PyObject | repeat(int
the number of times to repeat the sequence. howmany)Implements abstract org. Returns a (concrete subclass of) PySequence that repeats the given sequence, as in the
implementation of |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| protected String | unsupportedopMessage(String op, PyObject o2)
Overrides org. Return sequence-specific error messages suitable for substitution. |
| pack-priv final PyObject | |
| public PyObject | |
| pack-priv final int | |
| pack-priv static final PyObject | |
| public PyObject | |
| public PyObject |
| len | back to summary |
|---|---|
| private final long len | |
| start | back to summary |
|---|---|
| private final long start | |
| step | back to summary |
|---|---|
| private final long step | |
| stop | back to summary |
|---|---|
| private final long stop | |
| TYPE | back to summary |
|---|---|
| public static final PyType TYPE | |
| PyXRange | back to summary |
|---|---|
| public PyXRange(int ihigh) | |
| PyXRange | back to summary |
|---|---|
| public PyXRange(int ilow, int ihigh) | |
| PyXRange | back to summary |
|---|---|
| public PyXRange(int ilow, int ihigh, int istep) | |
| __getitem__ | back to summary |
|---|---|
| public PyObject __getitem__(PyObject index) Overrides org. Doc from org. Equivalent to the standard Python __getitem__ method. This method should not be overridden.
Override the | |
| __iter__ | back to summary |
|---|---|
| public PyObject __iter__() Overrides org. Doc from org. Return an iterator that is used to iterate the element of this sequence. From version 2.2, this method is the primary protocol for looping over sequences. If a PyObject subclass should support iteration based in the __finditem__() method, it must supply an implementation of __iter__() like this:
public PyObject __iter__() {
return new PySequenceIter(this);
}
When iterating over a python sequence from java code, it should be done with code like
this:
for (PyObject item : seq.asIterable()) {
// Do something with item
}
| |
| __len__ | back to summary |
|---|---|
| public int __len__() Overrides org. Doc from org. Equivalent to the standard Python __len__ method. Part of the mapping discipline.
| |
| __reduce__ | back to summary |
|---|---|
| public PyObject __reduce__() Overrides org. Doc from org. Used for pickling. Default implementation calls object___reduce__. | |
| __tojava__ | back to summary |
|---|---|
| public Object __tojava__(Class<?> c) Overrides org. Doc from org. Equivalent to the Jython __tojava__ method. Tries to coerce this object to an instance of the
requested Java class. Returns the special object | |
| getLenOfRange | back to summary |
|---|---|
| pack-priv static int getLenOfRange(long lo, long hi, long step) Return number of items in range/xrange (lo, hi, step). step > 0 required. Return a value < 0 if & only if the true value is too large to fit in a Java int.
int length of range | |
| getslice | back to summary |
|---|---|
| protected PyObject getslice(int start, int stop, int step) Implements abstract org. Doc from org. Returns a range of elements from the sequence.
a sequence corresponding the the given range of elements. | |
| pyget | back to summary |
|---|---|
| protected PyObject pyget(int i) Implements abstract org. Doc from org. Returns the element of the sequence at the given index. This is an extension point called by
PySequence in its implementation of | |
| range_iter | back to summary |
|---|---|
| private final PyXRangeIter range_iter() | |
| range_reverse | back to summary |
|---|---|
| private final PyXRangeIter range_reverse() | |
| repeat | back to summary |
|---|---|
| protected PyObject repeat(int howmany) Implements abstract org. Doc from org. Returns a (concrete subclass of) PySequence that repeats the given sequence, as in the
implementation of | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| unsupportedopMessage | back to summary |
|---|---|
| protected String unsupportedopMessage(String op, PyObject o2) Overrides org. Doc from org. Return sequence-specific error messages suitable for substitution. {0} is the op name. {1} is the left operand type. {2} is the right operand type.
| |
| xrange___getitem__ | back to summary |
|---|---|
pack-priv final PyObject xrange___getitem__(PyObject index)
| |
| xrange___iter__ | back to summary |
|---|---|
public PyObject xrange___iter__()
| |
| xrange___len__ | back to summary |
|---|---|
pack-priv final int xrange___len__()
| |
| xrange___new__ | back to summary |
|---|---|
pack-priv static final PyObject xrange___new__(PyNewWrapper new_, boolean init, PyType subtype, PyObject[] args, String[] keywords)
| |
| xrange___reduce__ | back to summary |
|---|---|
public PyObject xrange___reduce__()
| |
| xrange___reversed__ | back to summary |
|---|---|
public PyObject xrange___reversed__()
| |