Ashwanth's Java Utils

My personal set of utils that I take along with my java projects.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Ant Компиляция и сборка
Группа

Группа

in.ashwanthkumar
Идентификатор

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

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

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

0.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Ashwanth's Java Utils
My personal set of utils that I take along with my java projects.
Ссылка на сайт

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

https://github.com/ashwanthkumar/my-java-utils
Система контроля версий

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

https://github.com/ashwanthkumar/my-java-utils

Скачать my-java-utils

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

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

Зависимости

test (3)

Идентификатор библиотеки Тип Версия
org.mockito : mockito-all jar 1.10.19
junit : junit jar 4.10
org.hamcrest : hamcrest-all jar 1.1

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

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

Build Status

my-java-utils

Set of Java utils that I take along with my OSS java projects. Most of them are influenced from Scala world and Guava library. Library has zero external dependencies. If you find some implementations can be better, please do let me know.

Features

List

  • Lists#map
  • Lists#filter
  • Lists#foldL
  • Lists#find
  • Lists#mkString
  • Lists#Nil
  • Lists#concat
  • Lists#flatten
  • Lists#take
  • Lists#takeWhile

Set

  • Sets#copy
  • Sets#isEmpty
  • Sets#nonEmpty

Iterable

  • Iterables#exists
  • Iterables#forall
  • Iterables#head
  • Iterables#headOption
  • Iterables#isEmpty
  • Iterables#nonEmpty
  • Iterables#toMap
  • Iterables#foreach

Maps

  • Maps#of
  • Maps#builder
  • Maps#empty
  • Maps#getOrElse

Lang

  • Option / Some / None
  • Tuple2 / Tuple3
  • Function
  • Predicate

Functions

  • Functions#identity
  • Functions#STDOUT
  • Functions#STDERR

Predicates

  • Predicates#True
  • Predicates#False

StringUtils

  • StringUtils#isNotEmpty
  • StringUtils#isEmpty
  • StringUtils#startsWith
  • StringUtils#endsWith
  • StringUtils#size
  • StringUtils#trim
  • StringUtils#isBlank
  • StringUtils#isNotBlank

IO

  • IO#fromFile
  • IO#linesFromFile
  • IO#linesFromInputStream

Monadic Parsers

Parser<String> parser = Literal("input");
ParserResult<String> result = parser.parse("input is awesome"); // returns Success<String>
ParserResult<String> result = parser.parse("output is awesome"); // returns Failure<String>

Inspired from Scala's Parser Combinator and JS Parsimmon. Take a look at TemplateParser, it's implemented using this parser package.

Parsers

  • Parsers#Literal
  • Parsers#Character
  • Parsers#Integer
  • Parsers#Double
  • Parsers#Regex
  • Parsers#Sequence

Parser

  • Parser#map
  • Parser#thenR
  • Parser#thenL
  • Parser#then
  • Parser#or
  • Parser#debug
  • Parser#skip

TemplateParser

Supports #{variable} and #{variable?default} type syntax based rendering. Inspired from sbt-editsource plugin.

Dependencies

For Maven,

<dependency>
  <groupId>in.ashwanthkumar</groupId>
  <artifactId>my-java-utils</artifactId>
  <version>0.1.0</version>
</dependency>

For SBT,

libraryDependencies += "in.ashwanthkumar" % "my-java-utils" % "0.1.0"

License

http://www.apache.org/licenses/LICENSE-2.0

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

Версия
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1