| Modifier and Type | Class and Description |
|---|---|
| private static interface | PyUnicode.
Index translation between code point index (as seen by Python) and UTF-16 index (as used in the Java String. |
| private class | |
| private static class | |
| private static class | |
| private class | |
| private abstract class | |
| private static class | |
| private static class | |
| private class | PyUnicode.
An iterator returning code points from this array, for use when basic plane. |
| private class | PyUnicode.
An iterator returning code points from this array, for use when not basic plane. |
| private class | PyUnicode.
A class of index translation that uses the cumulative count so far of supplementary characters, tabulated in blocks of a standard size. |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final PyUnicode. | BASIC
A singleton provides the translation service (which is a pass-through) for all BMP strings. |
| private static final boolean | DEBUG_NON_BMP_METHODS
Nearly every significant method comes in two versions: one applicable when the string contains only basic plane characters, and one that is correct when supplementary characters are also present. |
| private final PyUnicode. | translator
The instance of index translation in use in this string. |
| public static final PyType | |
| private static final PyUnicode[] | unichars
Table used by |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| public | |
| pack-priv | |
| public | |
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public PyObject | __add__(PyObject
the object to perform this binary operation with (the right-hand operand). other)Overrides org. Equivalent to the standard Python __add__ method. |
| public PyComplex | __complex__()
Overrides org. Equivalent to the standard Python __complex__ method. |
| public boolean | __contains__(PyObject
the element to search for in this container. o)Overrides org. Equivalent to the standard Python __contains__ method. |
| public PyObject | __eq__(PyObject
the object to compare this with. other)Overrides org. Equivalent to the standard Python __eq__ method. |
| public PyObject | |
| public PyObject | __ge__(PyObject
the object to compare this with. other)Overrides org. Equivalent to the standard Python __ge__ method. |
| public PyObject | __gt__(PyObject
the object to compare this with. other)Overrides org. Equivalent to the standard Python __gt__ method. |
| public PyObject | __le__(PyObject
the object to compare this with. other)Overrides org. Equivalent to the standard Python __le__ method. |
| public int | __len__()
Overrides org. Equivalent to the standard Python __len__ method. |
| public PyObject | __lt__(PyObject
the object to compare this with. other)Overrides org. Equivalent to the standard Python __lt__ method. |
| public PyObject | __mod__(PyObject
the object to perform this binary operation with (the right-hand operand). other)Overrides org. Equivalent to the standard Python __mod__ method |
| public PyObject | __ne__(PyObject
the object to compare this with. other)Overrides org. Equivalent to the standard Python __ne__ method. |
| public PyString | __repr__()
Overrides org. Equivalent to the standard Python |
| public PyString | __str__()
Overrides org. Equivalent to the standard Python __str__ method. |
| public PyUnicode | |
| protected int | _findLeft(int
rightmost extent of string search right)Overrides org. Helper for |
| protected int | _findRight()
Overrides org. Helper for |
| public double | atof()
Overrides org. Convert this PyString to a floating-point value according to Python rules. |
| public int | |
| public PyLong | |
| private static int | Returns: 2 if a surrogate pair stands atp, 1 if notof UTF-16 code units string, int index into that string p)Called at each code point index, returns 2 if this is a surrogate pair, 1 otherwise, and detects lone surrogates as an error. |
| private static String | Returns: String from codepointto translate codePoint)Translate a code point to a Java String, guaranteeing validity. |
| private static String | Returns: String from codepointto translate codePoints)Translate a code point to a Java String, guaranteeing validity. |
| public static String | |
| private PyUnicode. | Returns: chosenIndexTranslatorChoose an |
| private static String | Returns: an equivalentStringthe object to coerce o)Interpret the object as a Java |
| private static PyUnicode | Returns: an equivalentPyUnicode (or o itself, or null)the object to coerce o, String of method name)Helper used in |
| private static String | Returns: an equivalentString (and never null)the object to coerce o)Interpret the object as a Java |
| private static String | Returns: an equivalentString or nullthe object to coerce o, boolean iff allowNullArgument)true allow a null or none argumentInterpret the object as a Java |
| private static String | Returns: an equivalentStringthe object to coerce o)Interpret the object as a Java |
| private static PyUnicode | Returns: an equivalentPyUnicode (or o itself)the object to coerce o)Interpret the object as a |
| private static PyUnicode | Returns: an equivalentPyUnicode (or o itself)the object to coerce o)Interpret the object as a |
| public PyString | createInstance(String
to wrap string)Overrides org. Create an instance of the same type as this object, from the Java String given as argument. |
| protected PyString | createInstance(String
UTF-16 string encoding the characters (as Java). string, boolean true if it is known that only BMP characters are present. isBasic)Overrides org. Create an instance of the same type as this object, from the Java String given as argument. |
| private String | Returns: a valid decimal as an encoded StringEncode unicode into a valid decimal String. |
| private String | Returns: a valid decimal as an encoded StringEncode unicode in the basic plane into a valid decimal String. |
| public boolean | Returns: true if this string slice ends with a specified suffix, otherwise
false.string to check for (or a suffix, PyObject PyTuple of them).start of slice. start, PyObject end of slice. end)Overrides org. Equivalent to the Python |
| private static PyException | |
| public static PyUnicode | |
| public static PyUnicode | Returns: a new or cachedPyUnicode for the characterof the single character required codepoint)Return a not-necessarily new |
| private static StringBuilder | |
| public static PyUnicode | fromInterned(String
String representing bytesHides org. Returns a PyUnicode from an already interned String. |
| public static PyUnicode | Returns: a new or re-usedPyUnicodeUTF-16 string encoding the characters (as Java). s, boolean true if it is known that only BMP characters are present. isBasic)Return a not-necessarily new |
| protected PyString | fromSubstring(int
first included character. begin, int first excluded character. end)Overrides org. Return a new object of the same type as this one equal to the slice
|
| public synchronized PyBuffer | Returns: always throws aClassCastExceptionconsumer requirements flags)Overrides org. Implements org.
|
| public int | |
| public int | |
| 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)Overrides org. Returns a range of elements from the sequence. |
| private static int[] | Returns: the index (counts) or null if basic planeto index string)Generate the table that is used by the class |
| public boolean | Returns: true if the string consists only of BMP charactersOverrides org. Determine whether the string consists entirely of basic-plane characters. |
| private static boolean | |
| public Iterator | |
| public PyString | |
| private PyUnicode. | |
| public Iterator | |
| public Iterator | newSubsequenceIterator(int start, int stop, int step)
Get an iterator over a slice of the code point sequence. |
| private static String | |
| private static int | |
| public PyTuple | partition(PyObject
str, unicode or object implementing sep)BufferProtocolOverrides org. Equivalent to Python |
| protected PyObject | pyget(int
index of element to return. i)Overrides org. Returns the element of the sequence at the given index. |
| public PyTuple | rpartition(PyObject
str, unicode or object implementing sep)BufferProtocolOverrides org. Equivalent to Python |
| protected PyList | rsplitfields(int
limit on the number of splits (if >=0) maxsplit)Overrides org. Helper function for |
| protected PyList | splitfields(int
limit on the number of splits (if >=0) maxsplit)Overrides org. Helper function for |
| public boolean | Returns: true if this string slice starts with a specified prefix, otherwise
false.string to check for (or a prefix, PyObject PyTuple of them).start of slice. start, PyObject end of slice. end)Overrides org. Equivalent to the Python |
| public String | substring(int
the beginning index, inclusive. start, int the ending index, exclusive. end)Overrides org. Return a substring of this object as a Java String. |
| public int[] | |
| protected int[] | translateIndices(PyObject
Python start of slice start, PyObject Python end of slice end)Overrides org. Many of the string methods deal with slices specified using Python slice semantics:
endpoints, which are |
| pack-priv final PyObject | |
| pack-priv final int | |
| pack-priv final boolean | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyTuple | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final int | |
| pack-priv final PyObject | |
| pack-priv final int | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyString | |
| pack-priv final PyObject | |
| pack-priv final PyString | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final int | |
| pack-priv final PyObject | |
| pack-priv final String | |
| pack-priv final boolean | |
| pack-priv final PyObject | |
| pack-priv final int | |
| pack-priv final PyObject | |
| pack-priv final int | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final PyUnicode | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv static final PyObject | |
| pack-priv final PyTuple | |
| pack-priv final PyString | |
| pack-priv final int | |
| pack-priv final int | |
| pack-priv final PyObject | |
| pack-priv final PyTuple | |
| pack-priv final PyList | |
| pack-priv final PyObject | |
| pack-priv final PyList | |
| pack-priv final PyList | |
| pack-priv final boolean | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| pack-priv final PyObject | |
| private static PyException | Returns: an exceptionindex within that sequence of the problematic code unit p, int the code unit c)Return a ready-to-throw exception indicating an unpaired surrogate. |