{"id":22337537,"url":"https://github.com/mkdika/jeneric","last_synced_at":"2025-07-29T22:32:58.268Z","repository":{"id":57726712,"uuid":"130326603","full_name":"mkdika/jeneric","owner":"mkdika","description":"A tiny library for collection of custom yet frequently used function and helper, build on top of Java 8 Standard API","archived":false,"fork":false,"pushed_at":"2018-10-02T02:24:53.000Z","size":146,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-07-01T14:46:19.415Z","etag":null,"topics":["helper-functions","java8"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkdika.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-20T07:33:53.000Z","updated_at":"2023-07-01T14:46:19.416Z","dependencies_parsed_at":"2022-09-05T20:40:29.680Z","dependency_job_id":null,"html_url":"https://github.com/mkdika/jeneric","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fjeneric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fjeneric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fjeneric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkdika%2Fjeneric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkdika","download_url":"https://codeload.github.com/mkdika/jeneric/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228054452,"owners_count":17862129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helper-functions","java8"],"created_at":"2024-12-04T06:10:26.887Z","updated_at":"2024-12-04T06:10:27.570Z","avatar_url":"https://github.com/mkdika.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jeneric\n[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](/LICENSE)\n[![Build Status](https://travis-ci.org/mkdika/jeneric.svg?branch=master)](https://travis-ci.org/mkdika/jeneric)\n[![codecov](https://codecov.io/gh/mkdika/jeneric/branch/master/graph/badge.svg)](https://codecov.io/gh/mkdika/jeneric)\n[![Maven](https://img.shields.io/maven-central/v/com.mkdika/jeneric.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.mkdika%22%20AND%20a%3A%22jeneric%22)\n[![Javadocs](https://www.javadoc.io/badge/com.mkdika/jeneric.svg)](https://www.javadoc.io/doc/com.mkdika/jeneric)\n\nA tiny library for collection of custom yet frequently used function and helper. \nBuild on top of Java 8 standard API, no external libraries is needed.\n\n\n## Overview\n\nThe main idea behind creating of this another helper and common use function library, \nis to ease the usage of specific and frequently functions call, that the practical usage\nmay not available on other library. Furthermore, Jeneric also provide a high level access \nfrom Java `static` method call or expression, so it does not require to instance certain \nobject prior usage. And as the result, functions supposed to be able to directly use and practical.\n\nJeneric is also a tiny library, the release size are relatively small (just less than `30 KB`), and \nused only Java 8 standard API. So, it may suit to any Java 8 project or mobile development (Android).\n\nThe collection of each functions are organize within parent class that base on its expected __return types__.\nThere are several parent class such as `StringFun`, `BooleanFun`, `DateFun`, `IntegerFun`, etc.\n\nFor more explanation and code examples, please visit [User Guide](/docs/user-guide.md).\n\n\n## Used Tool and Library\n- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html)\n- [Maven3](https://maven.apache.org/index.html), as build system and dependency management.\n- __Unit Testing__:\n\t- [JUnit4](https://junit.org/junit4/), as unit testing framework.\n\t- [Java Hamcrest](http://hamcrest.org/JavaHamcrest/), for ease matcher and more human readable equality test.\n\t- [JUnitParams](https://github.com/Pragmatists/JUnitParams), for ease parameterized test.\n\t- [Mockito](http://site.mockito.org/), a mock test framework.\n\t- [Jacoco](https://www.eclemma.org/jacoco/), a code coverage library.\n\t- [Pitest](http://pitest.org/), State of the art mutation testing system for the JVM.\n\n\n## Quickstart\n\n### Setting up dependency\n\n#### Maven\n\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.mkdika\u003c/groupId\u003e\n\t\u003cartifactId\u003ejeneric\u003c/artifactId\u003e\n\t\u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#### Gradle\n\n```groovy\ndependencies {\n    compile 'com.mkdika:jeneric:1.0.0'\n}\n```\n\n\n### Usage\n\nThis is a sample usage of Jeneric's function:\n\n```java\nimport com.mkdika.jeneric.function.DateFun;\nimport com.mkdika.jeneric.function.StringFun;\nimport java.util.Date;\n\npublic class JenericTest {\n\n    public static void main(String[] args) {\n        Date d1 = DateFun.of(2018, 4, 28, 19, 35, 25); // 28 Apr 2018 19:35:25\n        Date d2 = DateFun.of(2018, 5, 23, 12, 30, 45); // 23 May 2018 12:30:45\n        System.out.println(StringFun.elapsedTime(d1, d2));\n\n        // print: 24 days 16 hours 55 minutes 20 seconds 0 milliseconds        \n    }\n}\n```\n\n\n## Build, Testing and Install\n\n### Pre-requirement\n- Install Java 8 JDK.\n- [Install Maven3](https://maven.apache.org/install.html).\n\n### Build\nTo build from source, run this from project root:\n\t\n```console\nmvn clean package\n```\n\nCheck `target` folder, and search for `jeneric-\u003cversion\u003e.jar`, for built file.\t\n\t\n### Test\n\n#### Unit Test and Coverage Test\n\nRun this from project root:\n\n```console\nmvn test\n``` \n\nCheck folder and open file `target/site/jacoco/index.html`, for Jacoco coverage test result.\t\n\n#### Mutation Test\n\t\nAdditionally after built the project you can run the mutation test as well (please note it may need some time to finish), run this from project root:\n\t\n```console\nmvn org.pitest:pitest-maven:mutationCoverage\n```\n\nCheck folder and open file `target/pit-reports/\u003cYYYYMMDDHHMI\u003e/index.html`, for PiTest mutation test result.\n\n### Install in Local Maven Repository\n\nTo install into local Maven repository for development testing purpose, run this from project root:\n\n```console\nmvn install\n```\n\n\n## Documentation\n- For online host most recent version javadoc, please visit [Javadoc](https://www.javadoc.io/doc/com.mkdika/jeneric/1.0.0).\n- For user guide, please visit [User Guide](/docs/user-guide.md).\n\n## Maintainer\n- [Maikel Chandika](https://github.com/mkdika)\n- [Reja](https://github.com/zigic88)\n\nContributions are very welcome, please read [How to contribute](/docs/CONTRIBUTING.md).\n\n\n## License\nLicensed under the Apache License, Version 2.0. See [LICENSE](/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkdika%2Fjeneric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkdika%2Fjeneric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkdika%2Fjeneric/lists"}