{"id":28821254,"url":"https://github.com/cuioss/cui-java-tools","last_synced_at":"2026-02-04T10:23:11.553Z","repository":{"id":100588574,"uuid":"175820373","full_name":"cuioss/cui-java-tools","owner":"cuioss","description":"Utility Library acting as a replacement for googles guava, certain apache-commons libraries and logging facades/frameworks.","archived":false,"fork":false,"pushed_at":"2025-06-17T11:13:28.000Z","size":1070,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T11:20:46.261Z","etag":null,"topics":["java","library","utilities","utils"],"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/cuioss.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-15T12:56:59.000Z","updated_at":"2025-06-17T11:13:32.000Z","dependencies_parsed_at":"2023-11-07T00:42:18.679Z","dependency_job_id":"f0cf7db5-a1ab-4d77-9057-05b922d5a658","html_url":"https://github.com/cuioss/cui-java-tools","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/cuioss/cui-java-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuioss%2Fcui-java-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuioss%2Fcui-java-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuioss%2Fcui-java-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuioss%2Fcui-java-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuioss","download_url":"https://codeload.github.com/cuioss/cui-java-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuioss%2Fcui-java-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260640692,"owners_count":23040505,"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":["java","library","utilities","utils"],"created_at":"2025-06-18T22:06:07.667Z","updated_at":"2026-02-04T10:23:11.546Z","avatar_url":"https://github.com/cuioss.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= cui-java-tools\n\n== Status\n\nimage:https://github.com/cuioss/cui-java-tools/actions/workflows/maven.yml/badge.svg[Java CI with Maven,link=https://github.com/cuioss/cui-java-tools/actions/workflows/maven.yml]\nimage:http://img.shields.io/:license-apache-blue.svg[License,link=http://www.apache.org/licenses/LICENSE-2.0.html]\nimage:https://img.shields.io/maven-central/v/de.cuioss/cui-java-tools.svg?label=Maven%20Central[\"Maven Central\", link=\"https://central.sonatype.com/artifact/de.cuioss/cui-java-tools\"]\n\nhttps://sonarcloud.io/summary/new_code?id=cuioss_cui-java-tools[image:https://sonarcloud.io/api/project_badges/measure?project=cuioss_cui-java-tools\u0026metric=alert_status[Quality Gate Status]]\nimage:https://sonarcloud.io/api/project_badges/measure?project=cuioss_cui-java-tools\u0026metric=ncloc[Lines of Code,link=https://sonarcloud.io/summary/new_code?id=cuioss_cui-java-tools]\nimage:https://sonarcloud.io/api/project_badges/measure?project=cuioss_cui-java-tools\u0026metric=coverage[Coverage,link=https://sonarcloud.io/summary/new_code?id=cuioss_cui-java-tools]\n\nhttps://cuioss.github.io/cui-java-tools/about.html[Generated Documentation on github-pages]\n\n== Overview\n\nProvides essential Java utilities focused on simplicity and efficiency, following Jakarta EE standards.\n\n=== Key Features\n\n* Zero Dependencies\n* Extensive Tests and Documentation\n* Type-safe Property Access\n* Enhanced Collection Utilities\n* Reflection Helpers\n* Logging Utilities\n\n=== Design Goals\n\n* Zero Dependencies\n* Extensive Tests, Documentation, High Code Quality\n* Standard Java Integration: Most structures provide a convenience API for standard Java implementations\n\n=== Maven Coordinates\n\n[source,xml]\n----\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.cuioss\u003c/groupId\u003e\n    \u003cartifactId\u003ecui-java-tools\u003c/artifactId\u003e\n\u003c/dependency\u003e\n----\n\n=== Documentation\n\nFor detailed documentation, please refer to:\n\n* link:src/site/asciidoc/about.adoc[About Documentation]\n* https://cuioss.github.io/cui-java-tools/[JavaDoc Documentation]\n\n=== Contributing\n\nPlease refer to our link:CODE_OF_CONDUCT.md[Code of Conduct] for contribution guidelines.\n\n=== License\n\nLicensed under the Apache License, Version 2.0 - see the link:LICENSE[License file] for details.\n\n== What is it?\n\nProvides a number of useful utilities for java, similar to googles guava\n\n=== History\n\nFirst of all: We love guava and enjoyed working with it. While doing so\nwe learned a lot about java and software-engineering. But over the time\nit became too big and the messy library split up, just saying\n\"listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar\" gave us\nthe push to move on. We started to find or create something more\nsuitable for our needs. Our first approach was to create a stripped\nversion of guava removing all stuff we do not need. Not being happy with\nthe result we created our own called library \"cui-java-tools\".\nIn addition to the stuff derived from guava we picked some elements from\nother open-source libraries. Much of the code we implemented ourselves.\nThe goal was not create a complete general purpose java-util-library but\na library for our needs. It contains a lot of ideas and code of some\ngreat open-source projects:\n\n* https://github.com/google/guava[Google Guava]\n* https://github.com/apache/commons-codec[Apache Commons Codec]\n* https://github.com/apache/commons-io[Apache Commons IO]\n* https://github.com/apache/commons-lang[Apache Commons Lang]\n* https://github.com/spring-projects/spring-framework/blob/v5.1.8.RELEASE/spring-core/[Spring-Core]\n\n=== Comparison to Guava\n\n* Guava is huge with vast amounts of functionality\n* Guava provides a big number of implementations, while cui-java-tools\nacts more like a facade / decorator on java-standard elements\n* Many of Guavas Collection-implementations are said to be faster\ncompared to JRE variants. But usually this should not be a problem.\n* The size of Guava is about 15 times compared to cui-java-tools.\n\n== Provided Features\n\nSo, what's in the box, lets see by package:\n\n[[iocuiutilbase]]\n=== de.cuioss.tools.base\n\nProvides some basic utilities, inspired by googles package\n'com.google.common.base'\n\n[[iocuiutilbasebooleanoperations]]\n==== de.cuioss.tools.base.BooleanOperations\n\nProvides some minimal tooling for checking some `or` / `and` conditions,\ne.g.\n\n[source,java]\n----\n @​Test\n void shouldDetectAnyTrue() {\n     assertTrue(BooleanOperations.isAnyTrue(true));\n     assertTrue(BooleanOperations.isAnyTrue(true, true));\n     assertTrue(BooleanOperations.isAnyTrue(true, false));\n     assertFalse(BooleanOperations.isAnyTrue(false, false));\n     // Not really sensible, but defined contract -\u003e Corner Case\n     assertFalse(BooleanOperations.isAnyTrue());\n     assertFalse(BooleanOperations.isAnyTrue(null));\n }\n\n @​Test\n void shouldDetectAnyFalse() {\n     assertFalse(BooleanOperations.isAnyFalse(true));\n     assertTrue(BooleanOperations.isAnyFalse(true, false));\n     assertTrue(BooleanOperations.isAnyFalse(false, false));\n     // Not really sensible, but defined contract -\u003e Corner Case\n     assertFalse(BooleanOperations.isAnyFalse());\n     assertFalse(BooleanOperations.isAnyFalse(null));\n }\n\n @​Test\n void shouldDetectAllFalse() {\n     assertFalse(BooleanOperations.areAllFalse(true));\n     assertFalse(BooleanOperations.areAllFalse(true, false));\n     assertFalse(BooleanOperations.areAllFalse(true, true));\n     assertTrue(BooleanOperations.areAllFalse(false, false));\n     // Not really sensible, but defined contract -\u003e Corner Case\n     assertFalse(BooleanOperations.areAllFalse());\n     assertFalse(BooleanOperations.areAllFalse(null));\n }\n\n @​Test\n void shouldDetectAllTrue() {\n     assertTrue(BooleanOperations.areAllTrue(true));\n     assertFalse(BooleanOperations.areAllTrue(true, false));\n     assertTrue(BooleanOperations.areAllTrue(true, true));\n     assertFalse(BooleanOperations.areAllTrue(false, false));\n     // Not really sensible, but defined contract -\u003e Corner Case\n     assertTrue(BooleanOperations.areAllTrue());\n     assertTrue(BooleanOperations.areAllTrue(null));\n }\n----\n\n[[iocuiutilbasepreconditions]]\n==== de.cuioss.tools.base.Preconditions\n\nProvide some basic checks for states and arguments like\n\n[source,java]\n----\n     Preconditions.checkArgument(number.size \u003e 1); \n     Preconditions.checkArgument(number.size \u003e 2, \"The expected number must be greater than '2' but was %s\", number); \n     Preconditions.checkState(0 == number);\n     Preconditions.checkState(4 == number, \"The expected number must be '4' but was %s\", number);\n----\n\n[[iocuiutilcodec]]\n=== de.cuioss.tools.codec\n\nProvides types and structures similar to\nhttps://github.com/apache/commons-codec[https://github.com/apache/commons-codec].\nCurrently, it provides the capability for encoding / decoding Hex-values,\nsee de.cuioss.tools.codec.Hex\n\n[[iocuiutilcodechex]]\n==== de.cuioss.tools.codec.Hex\n\nConverts hexadecimal Strings. The Charset can be set explicitly, the\ndefault is `StandardCharsets.UTF_8`.\n\n[source,java]\n----\n   String roundtrip = \"roundtrip\";\n   assertEquals(roundtrip, new String(Hex.decodeHex(Hex.encodeHex(roundtrip.getBytes()))));\n\n----\n\n[[iocuiutilcollect]]\n=== de.cuioss.tools.collect\n\nProvides a number of utilities in the context of java.util.Collections\n\n[[iocuiutilcollectcollectionbuilder]]\n==== de.cuioss.tools.collect.CollectionBuilder\n\nBuilder for creating Collections providing some convenience methods. The\nclass writes everything through into the contained collector. Using the\ndefault constructor a newly created ArrayList will be used as collector,\nbut you can pass you own collector as constructor-argument. Of course\nthis should be mutable in order to work.\n\n===== Handling of null-values\n\nAs default null values are ignored. This behavior can be changed by call\naddNullValues(boolean). Caution: In case of using one of the\n`copyFrom(Collection)` methods for instantiation the null values will\nnot be checked in that way.\n\n===== Standard Usage\n\n[source,java]\n----\n     List\u003cString\u003e result = new CollectionBuilder\u003cString\u003e().add(\"this\").add(\"that\")\n         .add(mutableList(\"on\", \"or an other\")).toImmutableList();\n----\n\nor\n\n[source,java]\n----\n    Set\u003cString\u003e result = new CollectionBuilder\u003cString\u003e().add(\"this\").add(\"that\")\n        .add(mutableList(\"on\", \"or an other\")).toMutableSet();\n----\n\n===== Copy From\n\nThis methods can be used for ensuring a real copy Caution: The given\nsource will be used as it is, there will be no filtering as defined\nwithin `addNullValues(boolean)`.\n\n[source,java]\n----\n     List\u003cString\u003e result =\n     CollectionBuilder.copyFrom(mutableList(\"on\", \"or an other\")).add(\"element\").toMutableList();\n\n----\n\n[[iocuiutilcollectcollectionliterals]]\n==== de.cuioss.tools.collect.CollectionLiterals\n\nProvides a number of methods simplifying the task of creating populated\nCollections. In essence its doing the same compared to the corresponding\ncom.google.common.collect types but with different semantics (like\nnaming, types) and is designed as a one-stop utility class. It\ndifferentiates between the subtypes and mutability / immutability. This\nclass is complementary to the corresponding guava types.\n\n===== Lists\n\n[source,java]\n----\n    assertMutable(CollectionLiterals.mutableList(\"1\"));\n    assertMutable(CollectionLiterals.mutableList(\"1\", \"2\"));\n    assertMutable(CollectionLiterals.mutableList(Arrays.asList(\"1\", \"2\").stream()));\n----\n\n[source,java]\n----\n    assertImmutable(CollectionLiterals.immutableList(\"1\"));\n    assertImmutable(CollectionLiterals.immutableList(\"1\", \"2\"));\n    assertImmutable(CollectionLiterals.immutableList(Arrays.asList(\"1\", \"2\").stream()));\n----\n\n===== Sets\n\n[source,java]\n----\n    assertMutable(CollectionLiterals.mutableSet(\"1\"));\n    assertMutable(CollectionLiterals.mutableSet(\"1\", \"2\"));\n    assertMutable(CollectionLiterals.mutableSet(Arrays.asList(\"1\", \"2\").stream()));\n----\n\n[source,java]\n----\n    assertImmutable(CollectionLiterals.immutableSet(\"1\"));\n    assertImmutable(CollectionLiterals.immutableSet(\"1\", \"2\"));\n    assertImmutable(CollectionLiterals.immutableSet(Arrays.asList(\"1\", \"2\").stream()));\n----\n\n===== Maps\n\n[source,java]\n----\n    assertMutable(CollectionLiterals.mutableMap());\n    assertMutable(CollectionLiterals.mutableMap(\"1\", \"1-1\"));\n    assertMutable(CollectionLiterals.mutableMap(\"1\", \"1-1\", \"2\", \"2-2\", \"3\", \"3-3\", \"4\", \"4-4\"));\n----\n\n[source,java]\n----\n    assertImmutable(CollectionLiterals.immutableMap());\n    assertImmutable(CollectionLiterals.immutableMap(\"1\", \"1-1\"));\n    assertImmutable(CollectionLiterals.immutableMap(\"1\", \"1-1\", \"2\", \"2-2\", \"3\", \"3-3\", \"4\", \"4-4\"));\n----\n\n[[iocuiutilcollectmapbuilder]]\n==== de.cuioss.tools.collect.MapBuilder\n\nBuilder for creating Maps providing some convenience methods. The class\nwrites everything through into the contained collector. Using the\ndefault constructor a newly created HashMap will be used as collector,\nbut you can pass you own collector as constructor-argument. Of course\nthis should be mutable in order to work.\n\nAlthough not being a Map itself it provides the same methods with\ndifferent semantics -\u003e Builder approach.\n\n===== Standard Usage\n\n[source,java]\n----\n    MapBuilder\u003cString, String\u003e builder = new MapBuilder\u003c\u003e();\n    builder.put(\"key1\", \"value1\").put(\"key2\", \"value2\");\n    assertEquals(2, builder.size());\n    assertMutable(builder.toMutableMap());\n    assertImmutable(builder.toImmutableMap());\n----\n\n===== Using from()\n\nThis methods can be used for ensuring a real copy.\n\n[source,java]\n----\n    assertEquals(4, MapBuilder.from(\"key1\", 1, \"key2\", 2, \"key3\", 3, \"key4\", 4).size());\n----\n\n[[iocuiutilcollectmorecollections]]\n==== de.cuioss.tools.collect.MoreCollections\n\nUtility Methods for Collections and some types to be used in the context\nof Collections.\n\n===== isEmpty()\n\nThe overloaded method `MoreCollections.isEmpty(Collection)` checks all\nkinds of Collections / varargs parameter for not being null and\nemptiness. In case of Streams it solely checks for being not null in\norder not to consume it.\n\n===== requireNotEmpty()\n\nThe overloaded method `MoreCollections.requireNotEmpty(Collection)`\nchecks all kinds of Collections / varargs parameter for not being null\nnor empty. In case of being null / empty they will throw an\nIllegalArgumentException.\n\n===== Map Difference\n\nThe method `MoreCollections.difference(Map, Map)` creates a\nMapDifference view on the two given maps in order to check, well whether\nthey are equal or not and if not which elements are differing.\n\n===== Map contains key\n\nCheck whether the given Map contains at least one of the given keys\n(varags)\n\n[[iocuiutilcollectpartialcollection]]\n==== de.cuioss.tools.collect.PartialCollection\n\nRepresents a partial collection / sub-collection. It extends the\nCollection interface with isMoreAvailable() flag. This indicates that\nthe original Collection provides more data than the current\nPartialCollection. It defines the lower bound for the contained types to\nSerializable. Currently, the only implementation is PartialArrayList. It\nprovides convenient methods for instantiation, like\n`PartialArrayList.of(java.util.List, int)`.\n\n[[iocuiutilconcurrent]]\n=== de.cuioss.tools.concurrent\n\nSome tooling for concurrent operations.\n\n[source,java]\n----\nConcurrentTools.sleepUninterruptibly(500, TimeUnit.MILLISECONDS);\n----\n\nWell, sends the thread to sleep while taking care of the possible\ninterrupts\n\n[[iocuiutilconcurrentstopwatch]]\n==== de.cuioss.tools.concurrent.StopWatch\n\nAn object that measures elapsed time in nanoseconds.\n\n[source,java]\n----\nStopWatch stopwatch = StopWatch.createStarted();\ndoSomething();\nstopwatch.stop(); // optional\n\nDuration duration = stopwatch.elapsed();\n\nlog.info(\"time: \" + stopwatch); // formatted string like \"12.3 ms\"\n\n----\n\n[[iocuiutilformatting]]\n=== de.cuioss.tools.formatting\n\n==== The Problem\n\nProvide a text representation for given complex object. As a plus the\nformatting should be easy configurable with a simple DSL-style template\nlanguage.\n\n==== The Solution\n\nThe de.cuioss.tools.formatting framework presented here. The starting point\nis `de.cuioss.tools.formatting.template.FormatterSupport` providing two\nmethods:\n\n* `FormatterSupport.getSupportedPropertyNames()`:Provides the property\nnames that can be used for formatting\n* `FormatterSupport.getAvailablePropertyValues()`:Provides a name\nwith the supported names and values.\n\nThe other interface needed is\n`de.cuioss.tools.formatting.template.TemplateFormatter` defining the method\n`TemplateFormatter.format(FormatterSupport)` doing the actual\nformatting.\n\n==== Sample\n\nDto PersonName implementing\n`de.cuioss.tools.formatting.template.FormatterSupport`\n\n[source,java]\n----\nfinal PersonName personName = PersonName.builder()\n.setFamilyName(\"Fischers\")\n.setGivenName(\"Fritz\")\n.setMiddleName(\"Felix\")\n.setGivenNameSuffix(\"Dr.\")\n.build();\n\nfinal TemplateFormatter\u003cPersonName\u003e formatter = TemplateFormatterImpl.builder()\n.useTemplate(\"[familyName], [givenName], [middleName] [givenNameSuffix]\")\n.forType(PersonName.class);\n\nassertEquals(\"Fischers, Fritz, Felix Dr.\", formatter.format(personName));\n----\n\n[[iocuiutilio]]\n=== de.cuioss.tools.io\n\nProvides some IO-related tooling especially for `java.io.File`,\n`java.nio.file.Path` `java.io.InputStream` and `java.io.OutputStream`.\n\n[[iocuiutillang]]\n=== de.cuioss.tools.lang\n\nProvides utils for arbitrary objects and locales.\n\n[[iocuiutillanglocaleutils]]\n==== de.cuioss.tools.lang.LocaleUtils\n\n`LocaleUtils.toLocale(\"us_EN\")` Converts a String to a Locale. This\nmethod takes the string format of a locale and creates the locale object\nfrom it.\n\n[[iocuiutillangmoreobjects]]\n==== de.cuioss.tools.lang.MoreObjects\n\n===== requireType()\n\nChecks and returns the given Object if it is assignable to the given\ntargetType. Otherwise, it throws an IllegalArgumentException. This will be\nthrown also if one of the parameters is null.\n\n[source,java]\n----\n assertNotNull(MoreObjects.requireType(Integer.valueOf(0), Serializable.class));\n assertNotNull(MoreObjects.requireType(Integer.valueOf(1), Number.class));\n assertNotNull(MoreObjects.requireType(\"hello\", String.class));\n String hello = MoreObjects.requireType(\"hello\", String.class)\n       \n assertThrows(IllegalArgumentException.class, () -\u003e {\n   MoreObjects.requireType(\"hello\", Number.class);\n });\n       \n----\n\n===== allNonNull()\n\n[source,java]\n----\n assertTrue(MoreObjects.allNonNull());\n assertTrue(MoreObjects.allNonNull(\"\"));\n assertTrue(MoreObjects.allNonNull(\"\", 1, new File(\"\")));\n assertFalse(MoreObjects.allNonNull(\"\", null, new File(\"\")));\n assertFalse(MoreObjects.allNonNull(\"\", null));\n assertFalse(MoreObjects.allNonNull((String) null));\n\n----\n\n[[iocuiutillogging]]\n=== de.cuioss.tools.logging\n\nAlthough small in size, our logging framework is the most precious part\nof this library. It is a wrapper around java-util Logger that simplifies\nits usage. In addition, it provides an api similar to slf4j. It is not\nmeant to act as logging-facade like slf4j or similar logging frameworks. It\nonly provides a little syntactic sugar for the built-in logger.\n\n==== Obtaining a logger\n\n[source,java]\n----\nprivate static final CuiLogger log = new CuiLogger(SomeClass.class); \nprivate static final CuiLogger log = new CuiLogger(\"SomeLoggerName\"); \nprivate static final CuiLogger log = CuiLoggerFactory.getLogger(); \n----\n\n==== Logging\n\nCuiLogger provides an implicit code guard, if used correctly. Used\ncorrectly hereby means to either use formatting with parameter or\nincorporating Supplier for generating the actual log-message. For other\nmeans of creating a message you still can use code guards.\n\n[source,java]\n----\nlog.trace(\"Parameter-type matches exactly '{}'\", assignableSource); \nlog.debug(\"Adding found method '%s' on class '%s'\", name, clazz);\nlog.info(\"Starting up application\"); \n\n// In order not to mess up with the ellipsis parameter\n// exceptions must be the first parameter\nlog.warn(e, \"Exception during lenientFormat for '%s'\", objectToString); \nlog.error(e, \"Caught an exception\");  \n\nlog.info(() -\u003e \"Supplier can be used as well\");\nlog.error(e, () -\u003e \"Even with exceptions\"); \nlog.trace(() -\u003e \"I will only be evaluated if the trace-level for is enabled\"); \n----\n\n==== Formatting\n\nLike slf4j there is a simple way of formatting log-messages. In addition\nto `{}` the formatting supports `%s` as well. At runtime, it replaces the\n`{}` tokens with `%s` and passes the data to\n`MoreStrings.lenientFormat(String, Object)` for creating the actual\nlog-message. As a variant providing a Supplier works as well.\n\n[[iocuiutilstring]]\n=== de.cuioss.tools.string\n\nProvides a number of String-related utilities\n\n[[iocuiutilstringjoiner]]\n==== de.cuioss.tools.string.Joiner\n\nInspired by Googles Joiner. It uses internally the\n`String.join(CharSequence, Iterable)` implementation of java and\nprovides a guava like wrapper. It focuses on the simplified Joining and\nomits the Map based variants.\n\n===== Usage\n\n[source,java]\n----\nassertEquals(\"key=value\", Joiner.on('=').join(\"key\", \"value\"));\nassertEquals(\"key=no value\", Joiner.on('=').useForNull(\"no value\").join(\"key\", null));\nassertEquals(\"key\", Joiner.on('=').skipNulls().join(\"key\", null));\nassertEquals(\"key\", Joiner.on('=').skipEmptyStrings().join(\"key\", \"\"));\nassertEquals(\"key\", Joiner.on('=').skipBlankStrings().join(\"key\", \" \"));\n----\n\n===== Migrating from Guava\n\nIn order to migrate for most case you only need to replace the package\nname on the import.\n\n===== Changes to Guavas-Joiner\n\nIn case of content to be joined containing null-values and not set to\nskip nulls, `skipNulls()` it does not throw an `NullPointerException`\nbut writes `null` for each null element. You can define a different\nString by calling `useForNull(String) `\n\nIn addition to `skipEmptyStrings()` it provides a variant\n`skipBlankStrings()`\n\n[[iocuiutilstringmorestrings]]\n==== de.cuioss.tools.string.MoreStrings\n\nProvides a number basic String tooling scraped from commons-lang3,\nspring and guava.\n\n===== Usage\n\n====== Standard String Operations\n\n[source,java]\n----\nassertTrue(MoreStrings.isAllLowerCase(\"abc\"));\nassertFalse(MoreStrings.isAllLowerCase(\"abc \"));\n\nassertTrue(MoreStrings.isAllUpperCase(\"ABC\"));\nassertFalse(MoreStrings.isAllUpperCase(\"ABC \"));\n\nassertTrue(MoreStrings.isNumeric(\"1000\"));\nassertFalse(MoreStrings.isNumeric(\"A\"));\n\nassertTrue(MoreStrings.isEmpty(null));\nassertTrue(MoreStrings.isEmpty(\"\"));\nassertFalse(MoreStrings.isEmpty(\" \"));\n\nassertTrue(MoreStrings.isBlank(\"\"));\nassertFalse(MoreStrings.isBlank(\"  foo  \"));\n\nassertEquals(3, MoreStrings.countMatches(\"one long someone sentence of one\", \"one\"));\nassertEquals(0, MoreStrings.countMatches(\"one long someone sentence of one\", \"two\"));\n\nassertEquals(\"     \", MoreStrings.leftPad(\"\", 5, ' '));\nassertEquals(\"  abc\", MoreStrings.leftPad(\"abc\", 5, ' '));\n\nassertEquals(1, MoreStrings.indexOf(\"aabaabaa\", \"ab\", 0));\n\nassertEquals(\"  abc\", MoreStrings.stripEnd(\"  abc  \", \" \"));\n\nassertFalse(MoreStrings.hasNonWhitespaceChar(\" \"));\n----\n\n====== requireNotEmpty()\n\n[source,java]\n----\n// Positive / Passthrough cases\nMoreStrings.requireNotEmpty(NON_EMPTY_STRING);\nMoreStrings.requireNotEmpty(NON_EMPTY_STRING, MESSAGE);\n\nMoreStrings.requireNotEmptyTrimmed(NON_EMPTY_STRING);\nMoreStrings.requireNotEmptyTrimmed(NON_EMPTY_STRING, MESSAGE);\n\nassertThrows(IllegalArgumentException.class, () -\u003e {\n    MoreStrings.requireNotEmpty(\"\");\n});\nassertThrows(IllegalArgumentException.class, () -\u003e {\n    MoreStrings.requireNotEmpty(\"\", MESSAGE);\n});\n\nassertThrows(IllegalArgumentException.class, () -\u003e {\n    MoreStrings.requireNotEmptyTrimmed(\"\");\n});\nassertThrows(IllegalArgumentException.class, () -\u003e {\n    MoreStrings.requireNotEmptyTrimmed(\"\", MESSAGE);\n});\nassertThrows(IllegalArgumentException.class, () -\u003e {\n    MoreStrings.requireNotEmptyTrimmed(\" \");\n});\nassertThrows(IllegalArgumentException.class, () -\u003e {\n    MoreStrings.requireNotEmptyTrimmed(\" \", MESSAGE);\n});\n----\n\n[[nulltoempty--emptytonull]]\n====== nullToEmpty / emptyToNull\n\n[source,java]\n----\nassertEquals(NON_EMPTY_STRING, MoreStrings.nullToEmpty(NON_EMPTY_STRING));\nassertEquals(\"\", MoreStrings.nullToEmpty(null));\nassertEquals(\"\", MoreStrings.nullToEmpty(\"\"));\nassertEquals(\" \", MoreStrings.nullToEmpty(\" \"), \"Must not trim\");\n\nassertEquals(NON_EMPTY_STRING, MoreStrings.emptyToNull(NON_EMPTY_STRING));\nassertNull(MoreStrings.emptyToNull(null));\nassertNull(MoreStrings.emptyToNull(\"\"));\nassertEquals(\" \", MoreStrings.emptyToNull(\" \"), \"Must not trim\");\n\n----\n\n[[morestringslenientformat]]\n====== MoreStrings.lenientFormat\n\n[source,java]\n----\nassertEquals(\"%s\", MoreStrings.lenientFormat(\"%s\"));\nassertEquals(\"5\", MoreStrings.lenientFormat(\"%s\", 5));\nassertEquals(\"foo [5]\", MoreStrings.lenientFormat(\"foo\", 5));\nassertEquals(\"foo [5, 6, 7]\", MoreStrings.lenientFormat(\"foo\", 5, 6, 7));\nassertEquals(\"%s 1 2\", MoreStrings.lenientFormat(\"%s %s %s\", \"%s\", 1, 2));\nassertEquals(\" [5, 6]\", MoreStrings.lenientFormat(\"\", 5, 6));\nassertEquals(\"123\", MoreStrings.lenientFormat(\"%s%s%s\", 1, 2, 3));\nassertEquals(\"1%s%s\", MoreStrings.lenientFormat(\"%s%s%s\", 1));\nassertEquals(\"5 + 6 = 11\", MoreStrings.lenientFormat(\"%s + 6 = 11\", 5));\nassertEquals(\"5 + 6 = 11\", MoreStrings.lenientFormat(\"5 + %s = 11\", 6));\nassertEquals(\"5 + 6 = 11\", MoreStrings.lenientFormat(\"5 + 6 = %s\", 11));\nassertEquals(\"5 + 6 = 11\", MoreStrings.lenientFormat(\"%s + %s = %s\", 5, 6, 11));\nassertEquals(\"null [null, null]\", MoreStrings.lenientFormat(\"%s\", null, null, null));\nassertEquals(\"null [5, 6]\", MoreStrings.lenientFormat(null, 5, 6));\nassertEquals(\"null\", MoreStrings.lenientFormat(\"%s\", (Object) null));\nassertEquals(\"(Object[])null\", MoreStrings.lenientFormat(\"%s\", (Object[]) null));\n----\n\n[[iocuiutilnet]]\n=== de.cuioss.tools.net\n\nProvides utilities for network operations, including URL handling, internet address support, SSL, and HTTP helpers.\n\n==== de.cuioss.tools.net.http\n\nHTTP-related utilities, such as:\n\n* HttpHandler – HTTP request/response handling\n* HttpStatusFamily – HTTP status family detection\n* SecureSSLContextProvider – Secure SSL context for HTTP\n\n==== de.cuioss.tools.net.ssl\n\nSSL-related helpers, including:\n\n* KeyStoreProvider – KeyStore management\n* KeyMaterialHolder – Key material handling\n* KeyAlgorithm – Supported algorithms\n* KeyStoreType – KeyStore types\n\n==== de.cuioss.tools.net (core)\n\n* UrlHelper – URL manipulation utilities\n* UrlParameter – URL parameter handling\n* ParameterFilter – Parameter filtering\n* IDNInternetAddress – IDN support and internationalized domain handling\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuioss%2Fcui-java-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuioss%2Fcui-java-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuioss%2Fcui-java-tools/lists"}