The Kubernetes ecosystem is huge and quite complex, so it’s easy to forget about costs when trying out all of the exciting tools.
To avoid overspending on your Kubernetes cluster, definitely have a look at the free K8s cost monitoring tool from the automation platform CAST AI. You can view your costs in real time, allocate them, calculate burn rates for projects, spot anomalies or spikes, and get insightful reports you can share with your team.
Connect your cluster and start monitoring your K8s costs right away:
Cactoosis a library of object-oriented Java primitive types.
In this tutorial, we'll take a look at some of the classes available as a part of this library.
2. Cactoos
The Cactoos library's repertoire is pretty rich, ranging from string manipulation to data structures. The primitive types and their corresponding methods offered by this library are similar to the ones provided by other libraries like Guava and Apache Commons but are more focused on object-oriented design principles.
2.1. Comparison With Apache Commons
Cactoos library is equipped with classes that provide the same functionality as the static methods that are part of the Apache Commons library.
Let's take a look at some of these static methods that are part of the StringUtils package and their equivalent classes in Cactoos:
Static method of StringUtilsÂ
Equivalent Cactoos class
isBlank()
IsBlank
lowerCase()
Lowered
upperCase()
Upper
rotate()
Rotated
swapCase()
SwappedCase
stripStart()
TrimmedLeft
stripEnd()
TrimmedRight
More information on this can be found in the official documentation. We'll take a look at the implementation of some of these in the subsequent section.
3. The Maven Dependency
Let's start by adding the required Maven dependency. The latest version of this library can be found on Maven Central: