org.python.core.PyBaseString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jython-slim Show documentation
Show all versions of jython-slim Show documentation
Jython is an implementation of the high-level, dynamic, object-oriented
language Python written in 100% Pure Java, and seamlessly integrated with
the Java platform. It thus allows you to run Python on any Java platform.
package org.python.core;
import org.python.expose.ExposedType;
/**
* base class for jython strings.
*/
@ExposedType(name = "basestring", base = PyObject.class, doc = BuiltinDocs.basestring_doc)
public abstract class PyBaseString extends PySequence implements CharSequence {
public static final PyType TYPE = PyType.fromClass(PyBaseString.class);
protected PyBaseString(PyType type) {
super(type);
}
@Override
public char charAt(int index) {
return toString().charAt(index);
}
@Override
public int length() {
return toString().length();
}
@Override
public CharSequence subSequence(int start, int end) {
return toString().subSequence(start, end);
}
}