All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.python.core.PyBaseString Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.7.4
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy