Top Description Fields Constructors Methods
org.python.core

public abstract Class PyBaseString

extends PySequence
implements CharSequence
Class Inheritance
All Implemented Interfaces
java.lang.CharSequence
Known Direct Subclasses
org.python.core.PyString
Annotations
@ExposedType
name:basestring
base:PyObject
doc:Type basestring cannot be instantiated; it is the base for str and unicode.
Imports
org.python.expose.ExposedType

base class for jython strings.

Field Summary

Modifier and TypeField and Description
public static final PyType
Inherited from org.python.core.PySequence:
delegator

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public char
charAt(int
the index of the char value to be returned
index
)

Implements java.lang.CharSequence.charAt.

Returns the char value at the specified index.

public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.

public CharSequence
subSequence(int
the start index, inclusive
start
,
int
the end index, exclusive
end
)

Implements java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence.

Inherited from org.python.core.PySequence:
__delitem____delslice____eq____finditem____finditem____ge____getitem____getslice____gt____iter____le____lt____ne____nonzero____setitem____setitem____setslice____tojava__boundToSequencecmpdeldelRangedelslicefastSequencegetsliceisMappingTypeisNumberTypeisSequenceTypeisSubTypepygetpysetrepeatrunsupportedopMessageseq___delitem__seq___delslice__seq___eq__seq___finditem__seq___finditem__seq___ge__seq___getitem__seq___getslice__seq___gt__seq___iter__seq___le__seq___lt__seq___ne__seq___nonzero__seq___setitem__seq___setslice__setslicesliceLengthunsupportedopMessage

Field Detail

TYPEback to summary
public static final PyType TYPE

Hides org.python.core.PyObject.TYPE.

Constructor Detail

PyBaseStringback to summary
protected PyBaseString(PyType type)

Method Detail

charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Parameters
index:int

the index of the char value to be returned

Returns:char

the specified char value

Annotations
@Override

lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Returns:int

the number of chars in this sequence

Annotations
@Override

subSequenceback to summary
public CharSequence subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Doc from java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Parameters
start:int

the start index, inclusive

end:int

the end index, exclusive

Returns:CharSequence

the specified subsequence

Annotations
@Override