Yandex-Bolts

Collections utilities used in various Yandex projects

License

License

Categories

Categories

Dex General Purpose Libraries Utility
GroupId

GroupId

ru.yandex
ArtifactId

ArtifactId

bolts
Last Version

Last Version

1.0.6
Release Date

Release Date

Type

Type

jar
Description

Description

Yandex-Bolts
Collections utilities used in various Yandex projects
Project URL

Project URL

https://github.com/v1ctor/bolts
Project Organization

Project Organization

Yandex
Source Code Management

Source Code Management

https://github.com/v1ctor/bolts

Download bolts

How to add to project

<!-- 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"]

Dependencies

compile (2)

Group / Artifact Type Version
junit : junit jar 4.12
log4j : log4j jar 1.2.17

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.6