Giter Club home page Giter Club logo

utils-java's Introduction

1. Introduction

A collection of helper/utility methods for everyday (and sometimes rare) tasks.

It is written in Java, tests are handled by Groovy and Spock framework and the build system is based on Gradle.

Requirements

The only requirement is JDK 1.8. If you plan to build the project yourself, you need Gradle 2.5+.

API Documentation

Up-to-date API documentation is available at http://bahmanm.github.io/utils-java/

2. Contents

2.1 geometry

Euclidean operations in an n-dimensional space

2.1.1 geometry.Point

A point in an n-dimensional space.

2.1.2 geometry.Points

The operations on a point in an n-dimensional space.

2.2 SpatialUtils

  • distance: double → double → double → double → double: computes the distance between two points (using lat and lon).

2.3 ListCombinations

Combination of multiple lists as an iterator.

Example:

List<Integer> list1 = new ArrayList<>(); list1.add(0); list1.add(1);
List<Integer> list2 = new ArrayList<>(); list2.add(2); list2.add(4); list2.add(6);
ListCombinations<Integer> lc = new ListCombinations<>(list1, list2);
while (lc.hasNext()) {
  System.out.print("[");
  for (Integer i : lc.next())
    System.out.print(" " + i + " ");
  System.out.println("]");
}

// printed on STDOUT
[ 0  2 ]
[ 1  2 ]
[ 0  4 ]
[ 1  4 ]
[ 0  6 ]
[ 1  6 ]

3. How To Use

'utils' is published to BinTray.

3.1 Gradle

repositories {
  maven {
    url "http://jcenter.bintray.com"
  }
}

dependencies {
  compile group: 'com.bahmanm', name: 'utils', version: '0.6.0'
}

3.2 Maven

<repositories>
  <repository>
    <id>bintray</id>
    <name>bintray central</name>
    <url>http://jcenter.bintray.com</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>com.bahmanm</groupId>
    <artifactId>utils</artifactId>
    <version>0.6.0</version>
  </dependency>
</dependencies>

utils-java's People

Contributors

bahmanm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.