Datasets

Common datasets for tests

License

License

Categories

Categories

Data
GroupId

GroupId

com.github.sebhoss
ArtifactId

ArtifactId

datasets
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Datasets
Common datasets for tests
Project URL

Project URL

https://github.com/sebhoss/datasets
Source Code Management

Source Code Management

https://github.com/sebhoss/datasets

Download datasets

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
com.github.sebhoss : null-analysis jar
com.github.sebhoss : suppress-warnings jar

test (1)

Group / Artifact Type Version
junit : junit jar

Project Modules

There are no modules declared in this project.

Datasets

Collection of datasets, intended to be used inside of tests. DEPRECATED: Use Java 8 Random.doubles—, etc

Usage

Create random integers or longs:

// Create 100 random integers between Integer.MIN_VALUE and Integer.MAX_VALUE
int[] numbers = Datasets.ints()
        .build();
// Create 10 random longs between -250 and 250
long[] numbers = Datasets.longs()
        .lowestInclusive(-250)
        .highestInclusive(250)
        .numbersToCreate(10)
        .build();
// Create 100 random floats between 0 and Integer.MAX_VALUE using '42' as seed
float[] numbers = Datasets.floats()
        .lowestInclusive(0)
        .seed(42)
        .build();
// Create 100 random doubles between Integer.MIN_VALUE and 0 using '42' as seed
double[] numbers = Datasets.doubles()
        .highestInclusive(0)
        .seed(42)
        .build();

Integration

This project is uploaded into Maven Central. Take a look for the latest version.


<dependency>
  <groupId>com.github.sebhoss</groupId>
  <artifactId>datasets</artifactId>
  <version>${version.datasets}</version>
  <scope>test</scope>
</dependency>

Development

License

This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See LICENSE or http://www.wtfpl.net/ for more details.

Setup

This projects uses Java, Maven and Git as the main development tools. To build the project yourself just download & install at least Maven 3.0 and call mvn install inside the project folder. Maven should then proceed to clean, build, package and install this project.

Versioning

This project follows the semantic versioning guidelines.

Versions

Version
1.0.2
1.0.1
1.0.0