Abacus-Util
A general programming library in Java/Android. It's easy to learn and simple to use with concise and powerful APIs.
Features:
-
Most daily used APIs: N, StringUtil, Array, Seq, Iterators, Maps, DateUtil, IOUtil, Indexed, If, Try, Retry, Multiset, Multimap, DataSet, Sheet, BiMap, ImmutableList, ImmutableSet, ImmutableMap, Pair, Triple, Tuple, Range, Duration, Fraction, Splitter, Joiner, Builder, Holder, Difference, Comparators, Chain, Hashing, Clazz, Base64, Hex, JdbcUtil, CSVUtil, DigestUtil, JSONUtil, URLEncodedUtil, AsyncExecutor, CompletableFuture, Futures, HttpClient, Profiler, CodeGenerator...
-
Primitive Mutable: MutableBoolean, MutableChar, MutableByte, MutableShort, MutableInt, MutableLong, MutableFloat and MutableDouble.
-
Primitive List: BooleanList, CharList, ByteList, ShortList, IntList, LongList, FloatList and DoubleList.
-
Primitive Pair/Tuple: BooleanPair, BooleanTriple... DoublePair, DoubleTriple.
-
Primitive/Immutable Iterator: BooleanIterator, CharIterator, ByteIterator, ShortIterator, IntIterator, LongIterator, FloatIterator, DoubleIterator, ObjIterator, LineIterator and RowIterator.
-
Optional: OptionalBoolean, OptionalChar, OptionalByte, OptionalShort, OptionalInt, OptionalLong, OptionalFloat, OptionalDouble, Optional, Nullable and Any.
-
Streams, both sequential and parallel, are supported for JDK7/Anrdoid and primitive types with more functions: BaseStream, Stream, EntryStream, CharStream, ByteStream, ShortStream, IntStream, LongStream, FloatStream, DoubleStream, Fn and more Collectors.
-
Programming in Android: SQLiteExecutor, SQLBuilder, Async, CompletableFuture, Futures, EventBus, Observer, ObserverX and Fu.
-
SQL Builder/ORM: SQLExecutor, Mapper, SQLBuilder, DynamicSQLBuilder...
-
ORMs for NoSQL: MongoDBExecutor, CassandraExecutor with CQLBuilder, CouchbaseExecutor, HBaseExecutor, DynamoDBExecutor and Neo4jExecutor.
-
JSON/XML Data Binding: Parser, JSONParser, XMLParser, KryoParser, ParserFactory...
-
Pool: Pool, ObjectPool, KeyedObjectPool, PoolFactory...
-
Matrix: AbstractMatrix, Matrix, IntMatrix, LongMatrix, DoubleMatrix...
-
SpyMemcached/JRedis: SpyMemcached, JRedis, MemcachedLock.
-
More: Charsets, Ascii, CalendarUnit, NamingPolicy, Properties, PropertiesUtil, Wrapper, ArrayHashSet, ArrayHashMap, ClassUtil, EscapeUtil, FilenameUtil, AWSJSONUtil, AddrUtil, WSSecurityUtil, EmailUtil, IEEE754rUtil, Index, Median, f, Matth, SafeInitializer, Stopwatch, RateLimiter, Traverser(from JDK8, Apache commons, Google Guava...) ...
Changes:
Download/Installation &-
Gradle:
// JDK 1.8 or above:
compile 'com.landawn:abacus-util:1.2.16'
// JDK 1.7:
compile 'com.landawn:abacus-util-jdk7:1.2.16'
// Android (Java 1.7):
compile 'abacus-android-jdk7:1.2.16'
// Android-SE (Java 1.7) - small edition without Stream/Matrix/Sheet/...:
compile 'abacus-android-se-jdk7:1.2.16'
// Android (Java 1.8 or above):
compile 'com.landawn:abacus-android:1.2.16'
// Android-SE (Java 1.8 or above) - small edition without Stream/Matrix/Sheet/...:
compile 'com.landawn:abacus-android-se:1.2.16'
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 AbacusUtil)
An introduction to the java.util.stream library
Top Java 8 stream questions on stackoverflow
Kotlin vs Java 8 on Collection
User Guide:
Please refer to Wiki.
Recommended Java programming libraries/frameworks:
Guava, StreamEx, Kyro, snappy-java, lz4-java, Caffeine, Ehcache, Chronicle-Map...awesome-java