stream-goodies

Java Goodies for functional programming

Лицензия

Лицензия

Группа

Группа

org.danilopianini
Идентификатор

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

stream-goodies
Последняя версия

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

0.1.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

stream-goodies
Java Goodies for functional programming
Ссылка на сайт

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

https://github.com/DanySK/stream-goodies
Система контроля версий

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

https://github.com/DanySK/stream-goodies

Скачать stream-goodies

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar [r08, 21.0]

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

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

Boilerplate

Collection of boilerplate code that should ease writing Java 8+ code

Status

Stable branch

Build Status

Development branch

Build Status

Usage

Hashes

Murmur3-based hashing for arbitrary objects.

FastReadWriteLock

Implements a multiple-reader / single-writer lock relying on a single semaphore. Writers lock with write(), readers lock with read(). Both release the lock with release(). The lock must be used correctly by the programmer (releases made randomly are unchecked, and will break the locking system). Non-reentrant (calling write() twice produces a deadlock).

PrimitiveArrays

A set of utility methods for changing (through copy) the type of arrays. Allows for both widening and narrowing "casts" (with precision loss).

Streams.flatten

Flattens a recursive, hierarchical data structure to a Stream.

For instance:

Tree tree = new MyTree();
TreeNode root = tree.getRoot();
Stream<TreeNode> s = Streams.flatten(root, t -> t.getChildren().stream())

Would traverse the tree breadth-first.

SmallestN

A collector that efficiently selects the desired number of smallest elements from the stream. Returns a Guava MinMaxPriorityQueue, that is used to efficiently store only the required elements. This collector has in general better performance than the equivalent .sort().limit().collect() chain.

Import in your project

I warmly suggest to use Gradle, Maven or a similar system to deal with dependencies within your project. In this case, you can use this product by importing the following Maven dependency:

<dependency>
    <groupId>org.danilopianini</groupId>
    <artifactId>boilerplate</artifactId>
    <version>VERSION_YOU_WANT_TO_USE</version>
</dependency>

or the following Gradle dependency:

compile 'org.danilopianini:boilerplate:VERSION_YOU_WANT_TO_USE'

Alternatively, you can grab the latest jar and throw it in your classpath. In this case, be sure to include the dependencies of this project in your classpath as well.

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

Версия
0.1.1