|
|||||||||
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.PySequence
org.python.core.PyBaseString
org.python.core.PyString
public class PyString
A builtin python string.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.python.core.PyObject |
---|
PyObject.ConversionException |
Field Summary | |
---|---|
static PyType |
TYPE
|
Constructor Summary | |
---|---|
PyString()
|
|
PyString(char c)
|
|
PyString(PyType subType,
String string)
|
|
PyString(String string)
|
Method Summary | |
---|---|
PyObject |
__add__(PyObject other)
Equivalent to the standard Python __add__ method |
int |
__cmp__(PyObject other)
Equivalent to the standard Python __cmp__ method. |
PyComplex |
__complex__()
Equivalent to the standard Python __complex__ method. |
boolean |
__contains__(PyObject o)
Equivalent to the standard Python __contains__ method. |
PyObject |
__eq__(PyObject other)
Equivalent to the standard Python __eq__ method. |
PyFloat |
__float__()
Equivalent to the standard Python __float__ method. |
PyObject |
__ge__(PyObject other)
Equivalent to the standard Python __ge__ method. |
PyTuple |
__getnewargs__()
|
PyObject |
__gt__(PyObject other)
Equivalent to the standard Python __gt__ method. |
PyObject |
__int__()
Equivalent to the standard Python __int__ method. |
PyObject |
__invert__()
Equivalent to the standard Python __invert__ method. |
PyObject |
__le__(PyObject other)
Equivalent to the standard Python __le__ method. |
int |
__len__()
Equivalent to the standard Python __len__ method. |
PyObject |
__long__()
Equivalent to the standard Python __long__ method. |
PyObject |
__lt__(PyObject other)
Equivalent to the standard Python __lt__ method. |
PyObject |
__mod__(PyObject other)
Equivalent to the standard Python __mod__ method |
PyObject |
__mul__(PyObject o)
Equivalent to the standard Python __mul__ method |
PyObject |
__ne__(PyObject other)
Equivalent to the standard Python __ne__ method. |
PyObject |
__neg__()
Equivalent to the standard Python __neg__ method. |
PyObject |
__pos__()
Equivalent to the standard Python __pos__ method. |
PyString |
__repr__()
Equivalent to the standard Python __repr__ method. |
PyObject |
__rmul__(PyObject o)
Equivalent to the standard Python __rmul__ method |
PyString |
__str__()
Equivalent to the standard Python __str__ method. |
Object |
__tojava__(Class<?> c)
Equivalent to the Jython __tojava__ method. |
PyUnicode |
__unicode__()
|
double |
asDouble()
Convert this object into a double. |
int |
asInt()
Convert this object into an int. |
long |
asLong()
Convert this object longo an long. |
String |
asName(int index)
|
String |
asString()
|
String |
asString(int index)
|
double |
atof()
|
int |
atoi()
|
int |
atoi(int base)
|
PyLong |
atol()
|
PyLong |
atol(int base)
|
String |
capitalize()
|
String |
center(int width)
|
int |
count(String sub)
|
int |
count(String sub,
int start)
|
int |
count(String sub,
int start,
int end)
|
PyString |
createInstance(String str)
|
static String |
decode_UnicodeEscape(String str,
int start,
int end,
String errors,
boolean unicode)
|
PyObject |
decode()
|
PyObject |
decode(String encoding)
|
PyObject |
decode(String encoding,
String errors)
|
static String |
encode_UnicodeEscape(String str,
boolean use_quotes)
|
String |
encode()
|
String |
encode(String encoding)
|
String |
encode(String encoding,
String errors)
|
boolean |
endswith(PyObject suffix)
|
boolean |
endswith(PyObject suffix,
int start)
|
boolean |
endswith(PyObject suffix,
int start,
int end)
|
String |
expandtabs()
|
String |
expandtabs(int tabsize)
|
int |
find(String sub)
|
int |
find(String sub,
int start)
|
int |
find(String sub,
int start,
int end)
|
static PyString |
fromInterned(String interned)
Creates a PyString from an already interned String. |
String |
getString()
|
int |
hashCode()
|
int |
index(String sub)
|
int |
index(String sub,
int start)
|
int |
index(String sub,
int start,
int end)
|
String |
internedString()
|
boolean |
isalnum()
|
boolean |
isalpha()
|
boolean |
isdecimal()
|
boolean |
isdigit()
|
boolean |
islower()
|
boolean |
isnumeric()
|
boolean |
isspace()
|
boolean |
istitle()
|
boolean |
isunicode()
|
boolean |
isupper()
|
PyString |
join(PyObject seq)
|
String |
ljust(int width)
|
String |
ljust(int width,
String padding)
|
String |
lower()
|
String |
lstrip()
|
String |
lstrip(String sep)
|
PyTuple |
partition(PyObject sepObj)
|
int |
rfind(String sub)
|
int |
rfind(String sub,
int start)
|
int |
rfind(String sub,
int start,
int end)
|
int |
rindex(String sub)
|
int |
rindex(String sub,
int start)
|
int |
rindex(String sub,
int start,
int end)
|
String |
rjust(int width)
|
PyTuple |
rpartition(PyObject sepObj)
|
PyList |
rsplit()
|
PyList |
rsplit(String sep)
|
PyList |
rsplit(String sep,
int maxsplit)
|
String |
rstrip(String sep)
|
PyList |
split()
|
PyList |
split(String sep)
|
PyList |
split(String sep,
int maxsplit)
|
PyList |
splitlines()
|
PyList |
splitlines(boolean keepends)
|
boolean |
startswith(PyObject prefix)
|
boolean |
startswith(PyObject prefix,
int offset)
|
boolean |
startswith(PyObject prefix,
int start,
int end)
|
PyObject |
str___mod__(PyObject other)
|
String |
strip()
|
String |
strip(String sep)
|
String |
substring(int start,
int end)
|
String |
swapcase()
|
String |
title()
|
byte[] |
toBytes()
|
int[] |
toCodePoints()
|
String |
toString()
|
String |
translate(PyObject table)
|
String |
translate(String table)
|
String |
translate(String table,
String deletechars)
|
String |
upper()
|
String |
zfill(int width)
|
Methods inherited from class org.python.core.PySequence |
---|
__delitem__, __delslice__, __finditem__, __finditem__, __getitem__, __getslice__, __iter__, __nonzero__, __setitem__, __setitem__, __setslice__, isMappingType, isNumberType, isSequenceType |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PyType TYPE
Constructor Detail |
---|
public PyString()
public PyString(PyType subType, String string)
public PyString(String string)
public PyString(char c)
Method Detail |
---|
public String getString()
public static PyString fromInterned(String interned)
public int[] toCodePoints()
public String substring(int start, int end)
public PyString __str__()
PyObject
PyObject
is to
override the standard Java toString
method.
__str__
in class PyObject
public PyUnicode __unicode__()
__unicode__
in class PyObject
public int __len__()
PyObject
__len__
in class PyObject
public String toString()
toString
in class PyObject
public String internedString()
public PyString __repr__()
PyObject
PyObject
is to
override the standard Java toString
method.
__repr__
in class PyObject
public static String encode_UnicodeEscape(String str, boolean use_quotes)
public static String decode_UnicodeEscape(String str, int start, int end, String errors, boolean unicode)
public int __cmp__(PyObject other)
PyObject
__cmp__
in class PyObject
other
- the object to compare this with.
public PyObject __eq__(PyObject other)
PyObject
__eq__
in class PySequence
other
- the object to compare this with.
public PyObject __ne__(PyObject other)
PyObject
__ne__
in class PySequence
other
- the object to compare this with.
public PyObject __lt__(PyObject other)
PyObject
__lt__
in class PySequence
other
- the object to compare this with.
public PyObject __le__(PyObject other)
PyObject
__le__
in class PySequence
other
- the object to compare this with.
public PyObject __gt__(PyObject other)
PyObject
__gt__
in class PySequence
other
- the object to compare this with.
public PyObject __ge__(PyObject other)
PyObject
__ge__
in class PySequence
other
- the object to compare this with.
public int hashCode()
hashCode
in class PyObject
public byte[] toBytes()
public Object __tojava__(Class<?> c)
PyObject
Py.NoConversion
if this PyObject
can not be converted to the
desired Java class.
__tojava__
in class PySequence
c
- the Class to convert this PyObject
to.public PyString createInstance(String str)
public boolean __contains__(PyObject o)
PyObject
__contains__
in class PyObject
o
- the element to search for in this container.
public PyObject __mul__(PyObject o)
PyObject
__mul__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rmul__(PyObject o)
PyObject
__rmul__
in class PyObject
o
- the object to perform this binary operation with
(the left-hand operand).
public PyObject __add__(PyObject other)
PyObject
__add__
in class PyObject
other
- the object to perform this binary operation with
(the right-hand operand).
public PyTuple __getnewargs__()
__getnewargs__
in class PyObject
public PyObject __mod__(PyObject other)
PyObject
__mod__
in class PyObject
other
- the object to perform this binary operation with
(the right-hand operand).
public PyObject str___mod__(PyObject other)
public PyObject __int__()
PyObject
__int__
in class PyObject
public PyObject __long__()
PyObject
__long__
in class PyObject
public PyFloat __float__()
PyObject
__float__
in class PyObject
public PyObject __pos__()
PyObject
__pos__
in class PyObject
public PyObject __neg__()
PyObject
__neg__
in class PyObject
public PyObject __invert__()
PyObject
__invert__
in class PyObject
public PyComplex __complex__()
PyObject
__complex__
in class PyObject
public String lower()
public String upper()
public String title()
public String swapcase()
public String strip()
public String strip(String sep)
public String lstrip()
public String lstrip(String sep)
public String rstrip(String sep)
public PyList split()
public PyList split(String sep)
public PyList split(String sep, int maxsplit)
public PyList rsplit()
public PyList rsplit(String sep)
public PyList rsplit(String sep, int maxsplit)
public PyTuple partition(PyObject sepObj)
public PyTuple rpartition(PyObject sepObj)
public PyList splitlines()
public PyList splitlines(boolean keepends)
public int index(String sub)
public int index(String sub, int start)
public int index(String sub, int start, int end)
public int rindex(String sub)
public int rindex(String sub, int start)
public int rindex(String sub, int start, int end)
public int count(String sub)
public int count(String sub, int start)
public int count(String sub, int start, int end)
public int find(String sub)
public int find(String sub, int start)
public int find(String sub, int start, int end)
public int rfind(String sub)
public int rfind(String sub, int start)
public int rfind(String sub, int start, int end)
public double atof()
public int atoi()
public int atoi(int base)
public PyLong atol()
public PyLong atol(int base)
public String ljust(int width)
public String ljust(int width, String padding)
public String rjust(int width)
public String center(int width)
public String zfill(int width)
public String expandtabs()
public String expandtabs(int tabsize)
public String capitalize()
public PyString join(PyObject seq)
public boolean startswith(PyObject prefix)
public boolean startswith(PyObject prefix, int offset)
public boolean startswith(PyObject prefix, int start, int end)
public boolean endswith(PyObject suffix)
public boolean endswith(PyObject suffix, int start)
public boolean endswith(PyObject suffix, int start, int end)
public String translate(String table)
public String translate(String table, String deletechars)
public String translate(PyObject table)
public boolean islower()
public boolean isupper()
public boolean isalpha()
public boolean isalnum()
public boolean isdecimal()
public boolean isdigit()
public boolean isnumeric()
public boolean istitle()
public boolean isspace()
public boolean isunicode()
public String encode()
public String encode(String encoding)
public String encode(String encoding, String errors)
public PyObject decode()
public PyObject decode(String encoding)
public PyObject decode(String encoding, String errors)
public String asString(int index) throws PyObject.ConversionException
asString
in class PyObject
PyObject.ConversionException
public String asString()
asString
in class PyObject
public int asInt()
PyObject
asInt
in class PyObject
public long asLong()
PyObject
asLong
in class PyObject
public double asDouble()
PyObject
asDouble
in class PyObject
public String asName(int index) throws PyObject.ConversionException
asName
in class PyObject
PyObject.ConversionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |