官术网_书友最值得收藏!

Commons Lang

Apache Commons Lang is a set of utility classes that extend the java.util package and they make the life of a Java developer a lot easier by providing many little methods that solve common problems and save a lot of time.

To include external libraries in Java, we usually use Maven, which makes it very easy to manage dependencies. With Maven, the Apache Commons Lang library can be included using this dependency snippet:

<dependency> 
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>

The library contains a lot of methods useful for general-purpose Java programming, such as making it easier to implement the equals and hashCode methods for objects, serialization helpers and others. In general, they are not very specific to data science, but there are a few helper functions that are quite useful. For example,

  • RandomUtils and RandomStringUtils for generating data
  • StringEscapeUtils and LookupTranslator for escaping and un-escaping strings
  • EqualsBuilder and HashCodeBuilder for the fast implementation of equals and hashCode methods
  • StringUtils and WordUtils for useful string manipulation methods
  • the Pair class

For more information, you can read the documentation at https://commons.apache.org/lang.

The best way to see what is available is to download the package and see the code available there. Every Java developer will find a lot of useful things.

主站蜘蛛池模板: 鹿泉市| 于田县| 临猗县| 西畴县| 霍林郭勒市| 名山县| 南川市| 高雄市| 库尔勒市| 凤山市| 同仁县| 化德县| 怀仁县| 获嘉县| 汝阳县| 县级市| 曲松县| 湖北省| 建阳市| 隆化县| 清水县| 沙洋县| 陵川县| 南丰县| 革吉县| 上虞市| 易门县| 榆树市| 崇信县| 友谊县| 龙川县| 苗栗市| 伊吾县| 普兰店市| 进贤县| 巴东县| 南溪县| 马边| 文水县| 锡林浩特市| 鹤岗市|