Concurrency tool classes
This series of articles mainly on Java concurrency related content, including synchronization, lock, semaphore, blocking queue, thread pool, etc., the overall mind map as follows:
Series of articles list:
Java Concurrency Foundation-concurrency model, base interface, and thread
Java Co
or decrement a time field
Get (Intfield) Returns the value of the given Calendar field
getactualmaximum (Intfield) Returns the current maximum value for a given time field
getactualminimum (Intfield) Returns the current minimum value for a given time field
getinstance () Returns a calendar instance. Because the calendar is an abstract class and cannot be instantiated, you can only get an instance of it by u
Date type in Java scroll forward backward time (with tool class)Don't say much nonsense, first look at the tool class:1 ImportJava.text.SimpleDateFormat;2 ImportJava.util.Calendar;3 Importjava.util.Date;4 5 Public classDateroll {6 7 /**8 * Date type forward backward rol
I. Using the static modifier variable: When shared data is present in an object, the data is statically decorated, and the unique data in the object is defined as non-static in heap memory.Two. Use static to modify static functions: When there is no access to non-static data (object-specific data) inside the function, it can be defined as static.Three. Tool classes are designed to encapsulate functionality (in order to encapsulate data), there are no
)Returns a hash code based on the "deep content" of the specified array.7 Assigning a value to an arraypublic static void Fill (object[] A, Object val)Sets the value of all array elements of an array to Val.8 sortpublic static void sort (short[] a)Sorts the specified array of objects in ascending order based on the natural ordering of the elements. All elements in an array must implement the comparable interface.public static Sorts the specified array of objects according to the order produced b
Original: Java string to 16 binary tool class Hex.javaSource code: Http://www.zuidaima.com/share/1550463378410496.htmJava string to 16 binary tool class Hex.java implementation 16 binary 0XFECD. And the Java string to the mutual c
A common programming task is to read from one file, modify the content, and then write the contents to another file. Java to implement read, write operations, you need to create multiple classes to produce a Stream to operate.The following is a simple tool class that encapsulates the read and write operations of a file, providing a concise interface.ImportJava.io
Directory location in the project under the tool class:1. Chinese into pinyin, initials, Chinesechartopinyin, when using this class must be added Pinyin.jar,pinyin.jar has been placed in the Hqhop-framework-web project Lib directory;How to use:The Chinesechartopinyin provides only two methods:public static string Getpinyin (String src) {...} Convert Chinese chara
Expressions the * @returnBoolean - */ in Public Static Booleanreg (String str, string reg) { the BooleanMatch =false; the About Try { thePattern pattern =Pattern.compile (reg); theMatcher Matcher =Pattern.matcher (str); theMatch =matcher.matches (); +}Catch(patternsyntaxexception PSE) { -msg = Conserror. Error_illegal_regex +pse.getmessage (); the logger.error (MSG, PSE);Bayi } the the returnmatch; - } -}At this point,
This essay mainly introduces a tool class written in the Java language that converts one file encoding to another and does not change the contents of a file:By reading the contents of the source file, it is implemented by recoding and decoding by urlencoding. 1 Public classchangefileencoding {2 Public Static intFileCount = 0;3 Public StaticStr
and exchange data types, so when the consumer returns from the Exchange () method, it has 10 strings inside the buffer. When the producer returns from the Exchange () method, it has a blank buffer to re-write. This operation repeats 10 times.As you perform the example, you will find out how producers and consumers are concurrently performing tasks and how they exchange buffers at each step. This happens as with other synchronization tools, and the first call to the Exchange () method goes into
Article title: Java List Sort the tool class by the specified field.
Article Address: http://blog.csdn.net/5iasp/article/details/17717179
Includes the following classes
1. Entity class
Package com.newyear.wish;
/**
* Entity class * * */public
Source: Java Random String Tool classSource code: Http://www.zuidaima.com/share/1550463479532544.htmJava random string of the tool class can be all numbers, characters, can also be a combination of characters and numbers of the tool clas
Java Study Notes 33 (Collection framework 7: Collections tool class ),
The array has a tool class and operations on the array.
The collection also has a tool class: Collections
Examples
Tool class for manipulating collections collections
Java provides a tool class for manipulating set, list, and map collections: Collections, which provides a number of ways to sort, query, and modify collection elements, and provides Sets the collection object to immut
public static
8. Unmodifiable SeriesEnsure that the encapsulated collection cannot be changed.
public static
public static
public static
public static
public static
public static Extends v> m)
9. OtherThe Collections tool class features more than these, as well as methods such as fill (), rotate (), Max (), Min (), and so on. It is not possible to remember
The Apache Toolkit Common-lang has a very useful tool class for handling strings, one of which is stringescapeutils, a tool class that is added to the 2.3 version above, and it can be easily html,xml with The escape and reversal semantics of Java, but also the key string can
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.