Yandex-Bolts

Collections utilities used in various Yandex projects

Лицензия

Лицензия

Категории

Категории

Dex Универсальные библиотеки Utility
Группа

Группа

ru.yandex
Идентификатор

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

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

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

1.0.6
Дата

Дата

Тип

Тип

jar
Описание

Описание

Yandex-Bolts
Collections utilities used in various Yandex projects
Ссылка на сайт

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

https://github.com/v1ctor/bolts
Организация-разработчик

Организация-разработчик

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

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

https://github.com/v1ctor/bolts

Скачать bolts

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

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
log4j : log4j jar 1.2.17

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

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

Collections utilities used in various Yandex projects.

  • Package contains utilities that are
    • unrelated to Yandex
    • generic enough so that they are useful in the most project
    • functional

Install

<dependency>
  <groupId>ru.yandex</groupId>
  <artifactId>bolts</artifactId>
  <version>1.0.6</version>
</dependency>

Usage

Cf

Cf.map();
Cf.hashMap();
Cf.list();
Cf.arrayList();
Cf.linkedList();
Cf.set();
Cf.hashSet();

Option

Option<Integer> some = Option.some(1);
assert some.isDefined() == true;
assert some.isEmpty() == false;
assert some.get() == 1;

Option<Integer> none = Option.none();
assert none.isDefined() == false;
assert some.isEmpty() == true;

ListF

Cf.list(1, 2, 3, 16).map(i -> i * i);
[1, 4, 9, 16]
Cf.list(1, 2, 3, 4).filter(i -> i % 2 == 0);
[2, 4]

SetF

MapF

CollectionF

Tuple2

Either

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

Версия
1.0.6