|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.python.core.PyObject
org.python.core.PySlice
public class PySlice
The Python slice object.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.python.core.PyObject |
---|
PyObject.ConversionException |
Field Summary | |
---|---|
PyObject |
start
|
PyObject |
step
|
PyObject |
stop
|
static PyType |
TYPE
|
Constructor Summary | |
---|---|
PySlice()
|
|
PySlice(PyObject start,
PyObject stop,
PyObject step)
|
|
PySlice(PyType type)
|
Method Summary | |
---|---|
PyObject |
__eq__(PyObject o)
Equivalent to the standard Python __eq__ method. |
PyObject |
__ne__(PyObject o)
Equivalent to the standard Python __ne__ method. |
PyString |
__repr__()
Equivalent to the standard Python __repr__ method. |
PyString |
__str__()
Equivalent to the standard Python __str__ method. |
static int |
calculateSliceIndex(PyObject v)
|
PyObject |
getStart()
|
PyObject |
getStep()
|
PyObject |
getStop()
|
int |
hashCode()
|
PyObject |
indices(PyObject len)
|
static PyObject[] |
indices2(PyObject obj,
PyObject start,
PyObject stop)
Calculate indices for the deprecated __get/set/delslice__ methods. |
int[] |
indicesEx(int len)
Calculates the actual indices of a slice with this slice's start, stop, step and slicelength values for a sequence of length len . |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PyType TYPE
public PyObject start
public PyObject stop
public PyObject step
Constructor Detail |
---|
public PySlice()
public PySlice(PyType type)
public PySlice(PyObject start, PyObject stop, PyObject step)
Method Detail |
---|
public int hashCode()
hashCode
in class PyObject
public PyString __str__()
PyObject
PyObject
is to
override the standard Java toString
method.
__str__
in class PyObject
public PyString __repr__()
PyObject
PyObject
is to
override the standard Java toString
method.
__repr__
in class PyObject
public PyObject __eq__(PyObject o)
PyObject
__eq__
in class PyObject
o
- the object to compare this with.
public PyObject __ne__(PyObject o)
PyObject
__ne__
in class PyObject
o
- the object to compare this with.
public PyObject indices(PyObject len)
public int[] indicesEx(int len)
len
.
public static PyObject[] indices2(PyObject obj, PyObject start, PyObject stop)
obj
- the object being slicedstart
- the slice operation's startstop
- the slice operation's stop
public static int calculateSliceIndex(PyObject v)
public final PyObject getStart()
public final PyObject getStop()
public final PyObject getStep()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |