Either

A tiny library that offers the Either type in Java.

Лицензия

Лицензия

Группа

Группа

de.scravy
Идентификатор

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

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

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

1.3.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Either
A tiny library that offers the Either type in Java.
Ссылка на сайт

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

https://github.com/scravy/java-either
Система контроля версий

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

https://github.com/scravy/java-either

Скачать either

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
de.scravy : pair jar 1.1.0
junit : junit jar 4.12

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.16.2

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

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

java-either

Do you know https://hackage.haskell.org/package/base-4.7.0.0/docs/Data-Either.html? So this is the crippled Java version of it.

It's on Maven Central

<dependency>
  <groupId>de.scravy</groupId>
  <artifactId>either</artifactId>
  <version>1.0.0</version>
</dependency>

It's easy

final Either<String, Exception> value = Either.left("Hello World!");
if (value.isLeft()) {
    System.out.println(value.getLeft());
}

-or-

final Either<String, Exception> value = Either.left("Hello World!");
if (value instanceof Either.Left) {
    System.out.println(value.getLeft());
}

It's free

MIT License.

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

Версия
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0