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

aQute.bnd.properties.ITextStore Maven / Gradle / Ivy

There is a newer version: 7.0.0
Show newest version
package aQute.bnd.properties;

/**
 * Interface for storing and managing text.
 * 

* Provides access to the stored text and allows to manipulate it. *

*

* Clients may implement this interface or use * {@code GapTextStore} or * {@code CopyOnWriteTextStore}. *

*/ public interface ITextStore { /** * Returns the character at the specified offset. * * @param offset the offset in this text store * @return the character at this offset */ char get(int offset); /** * Returns the text of the specified character range. * * @param offset the offset of the range * @param length the length of the range * @return the text of the range */ String get(int offset, int length); /** * Returns number of characters stored in this text store. * * @return the number of characters stored in this text store */ int getLength(); /** * Replaces the specified character range with the given text. * replace(getLength(), 0, "some text") is a valid call and * appends text to the end of the text store. * * @param offset the offset of the range to be replaced * @param length the number of characters to be replaced * @param text the substitution text */ void replace(int offset, int length, String text); /** * Replace the content of the text store with the given text. Convenience * method for replace(0, getLength(), text. * * @param text the new content of the text store */ void set(String text); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy