Ti-Utils

The Ti-Utils library contains general utilities functionalities.

Лицензия

Лицензия

Группа

Группа

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

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

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

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

1.2.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Ti-Utils
The Ti-Utils library contains general utilities functionalities.
Ссылка на сайт

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

https://github.com/gematik/ref-Ti-Utils
Организация-разработчик

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

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

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

https://github.com/gematik/ref-Ti-Utils

Скачать utils

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

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

Зависимости

runtime (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.25

test (6)

Идентификатор библиотеки Тип Версия
de.gematik.ti : cardreader.provider.api jar 1.2.1
junit : junit jar 4.12
org.sonarsource.java : sonar-jacoco-listeners jar 3.8
org.mockito : mockito-core jar 3.0.0
org.apache.logging.log4j : log4j-slf4j-impl jar 2.8.1
org.apache.logging.log4j : log4j-core jar 2.8.1

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

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

Ti-Utils

This part describes the Ti-Utils functionalities and structure.

API Documentation

Generated API docs are available at https://gematik.github.io/ref-Ti-Utils.

License

Licensed under the Apache License, Version 2.0.

Structure

StreamUtils

The StreamUtils functions capture exception thrown by execution on streams. With special funktions will wrap the call on orginal object and all exception wrapped as StreamRuntimeException.

StreamUtils structure

The usage is described in GettingStarted Ti-Utils

Codec

This package contains a Hex class with converter functionality for hex strings. The Hex class is inspired from org.apache.commons.codec.binary.Hex (Licence: http://www.apache.org/licenses/). Detailed information will found in javadoc of this project.

Codec package structure

Primitives

This package contains a Bytes class with utils functionality for byte arrays. The Hex class is inspired from com.google.common.primitives.Bytes (Apache License 2.0) http://www.apache.org/licenses/LICENSE-2.0.html See the Guava User Guide article on primitive utilities.

Detailed information will found in javadoc of this project.

Primitives package structure

Getting Started

Build setup

To use Ti-Utils library in a project, you need just to include following dependency:

Gradle dependency settings to use Ti-Utils library.

dependencies {
    implementation group: 'de.gematik.ti', name: 'utils', version: '1.2.1'
}

Maven dependency settings to use Ti-Utils library.

<dependencies>
    <dependency>
        <groupId>de.gematik.ti</groupId>
        <artifactId>utils</artifactId>
        <version>1.2.1</version>
    </dependency>
</dependencies>

StreamUtils

The StreamUtils methods are available as static call with de.gematik.ti.utils.streams.stat.StreamUtils and as instance call from de.gematik.ti.utils.streams.StreamUtils.

WrapConsumer call

WrapConsumer call with StreamUtils.

private List<ExceptionClass> list;
list = Arrays.asList(new ExceptionClass(), new ExceptionClass(), new ExceptionClass());

list.stream().forEach(new StreamUtils().wrapConsumer(v -> v.testMethod()));

This is also available as a static method call with StreamUtils from package de.gematik.ti.utils.streams.stat

WrapConsumer call with static StreamUtils.

private List<ExceptionClass> list;
list = Arrays.asList(new ExceptionClass(), new ExceptionClass(), new ExceptionClass());

list.stream().forEach(StreamUtils.wrapConsumer(v -> v.testMethod()));

WrapFunction call

WrapFunction call with StreamUtils.

private List<ExceptionClass> list;
list = Arrays.asList(new ExceptionClass(), new ExceptionClass(), new ExceptionClass());

list.stream().map(new StreamUtils().wrapFunction(v -> v.getValue())).collect(Collectors.toList());

This is also available as a static method call with StreamUtils from package de.gematik.ti.utils.streams.stat

WrapFunction call with static StreamUtils.

private List<ExceptionClass> list;
list = Arrays.asList(new ExceptionClass(), new ExceptionClass(), new ExceptionClass());

list.stream().map(StreamUtils.wrapFunction(v -> v.getValue())).collect(Collectors.toList());
de.gematik.ti

Gematik

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

Версия
1.2.1