Skip to content

landawn/abacus-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

abacus-common

Maven Central Javadocs

A general programming library in Java. It's easy to learn and simple to use with concise and powerful APIs.

Features:

Download/Installation & Changes:

<dependency>
	<groupId>com.landawn</groupId>
	<artifactId>abacus-common</artifactId>
	<version>5.8.2</version> 
<dependency>
  • Gradle:
// JDK 17 or above:
compile 'com.landawn:abacus-common:5.8.2'

Functional Programming:

(It's very important to learn Lambdas and Stream APIs in Java 8 to get the best user experiences with the APIs provided in abacus-common)

What's New in Java 8

An introduction to the java.util.stream library

When to use parallel streams

Top Java 8 stream questions on stackoverflow

Kotlin vs Java 8 on Collection

User Guide:

Please refer to Wiki

Recommended Java programming libraries/frameworks:

lombok, Guava, protobuf, Kyro, snappy-java, lz4-java, Caffeine, Ehcache, Chronicle-Map, echarts, Chartjs, Highcharts, Apache POI, easyexcel, opencsv, mapstruct, fastutil, hppc, re2j ... awesome-java

Recommended Java programming tools:

Spotbugs, JaCoCo...

A Few Principles About Design and Implementation in This Library:

  • In general, empty String, Collection, Map, etc., are returned instead of null. However, null may be returned in certain methods, such as Strings.firstNonEmpty() or Strings.emptyToNull(). Methods that may return null are typically annotated with @MayReturnNull.

  • Methods are designed to support broad and general use cases. null parameters are usually allowed, as long as they do not violate the contract of the method. For example: Numbers.createNumber(...) or N.filter(...). It is up to the user to handle null values appropriately if they are invalid in a given context.

  • Due to the large number of methods in this library, consistently handling exceptions such as IllegalArgumentException, NullPointerException, IndexOutOfBoundsException, and similar across the entire codebase is challenging. Therefore, these exceptions should not be treated differently. The following approach is not recommended:

		try {
		    call some methods which may throw IllegalArgumentException or NullPointerException in this library.
		} catch (IllegalArgumentException e) {
		    // do something.
		} catch (NullPointerException e) {
		    // do something else.
		}

If Proposals is slow with Big class: N, Strings, Stream, Open the class file and explore the methods in outline once. Then test again. image

                           ...beyond imagination...