Twine

Rope data structure for any type of element.

Лицензия

Лицензия

Группа

Группа

uk.me.candle
Идентификатор

Идентификатор

twine
Последняя версия

Последняя версия

0.0.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

Twine
Rope data structure for any type of element.
Ссылка на сайт

Ссылка на сайт

https://github.com/CandleCandle/twine
Система контроля версий

Система контроля версий

https://github.com/CandleCandle/twine

Скачать twine

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/uk.me.candle/twine/ -->
<dependency>
    <groupId>uk.me.candle</groupId>
    <artifactId>twine</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/uk.me.candle/twine/
implementation 'uk.me.candle:twine:0.0.5'
// https://jarcasting.com/artifacts/uk.me.candle/twine/
implementation ("uk.me.candle:twine:0.0.5")
'uk.me.candle:twine:jar:0.0.5'
<dependency org="uk.me.candle" name="twine" rev="0.0.5">
  <artifact name="twine" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.me.candle', module='twine', version='0.0.5')
)
libraryDependencies += "uk.me.candle" % "twine" % "0.0.5"
[uk.me.candle/twine "0.0.5"]

Зависимости

test (5)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter jar 5.5.2
org.junit.jupiter : junit-jupiter-engine jar 5.5.2
org.junit.platform : junit-platform-runner jar 1.5.0
org.mockito : mockito-junit-jupiter jar 3.1.0
org.hamcrest : hamcrest-core jar 2.2

Модули Проекта

Данный проект не имеет модулей.

Twine

Generic library implementing a rope data structure.

Usage

Maven

Include a dependency in your pom.xml

<dependency>
    <groupId>uk.me.candle.twine</groupId>
    <artifactId>twine</artifactId>
    <version>[latest version]</version>
</dependency>

The latest version can be found on maven central: https://search.maven.org/search?q=g:uk.me.candle%20a:twine

Java

Rope<Character, CharSeqSliceable> rope = new BasicMutableRope<>();
// create a new empty Rope.

rope.append(new CharSeqSliceable("this is a rope element.\n"));
rope.append(new CharSeqSliceable("this is another rope element."));
// `rope` now contains "this is a rope element.\nthis is another rope element."

List<Character, CharSeqSliceable>> parts = rope.split(15);
// parts.get(0) now contains a Rope containing "this is a rope "
// parts.get(1) now contains a Rope containing " element.\nthis is another rope element."

Rope<Character, CharSeqSliceable> another = rope.insert(new CharSeqSliceable("\r"), 24);
// `another now contains "this is a rope element.\r\nthis is another rope element."

Extending

Implement the Sliceable interface for your array/list-like data structure.

public class MySliceable implements Sliceable<ElementType, MySliceable> { ... }

Create a Rope using it:

Rope<ElementType, MySliceable> rope = new BasicMutableRope<>();

Версии библиотеки

Версия
0.0.5
0.0.4