Ordering is Guava’s fluent Comparator class and implements Comparator interface. It can be used to build complex comparators and apply them to collections of objects.
Okay, so let’s getting started. Firstly, we declared a String type List:
Custom Tag is a user-defined JSP language element. When it is contained in JSP page and it will translate into a servlet, the custom tag is converted to opertions on an object called a tag handler. The web container then invokes those operations when the JSP page’s servlet is executed.
If we want to create a custom tag, what we need to do is simply extend SimpleTagSupport class and override the doTag() method, where you can place your code to generate content for the tag.
Let’s getting started to create a custom tag now. As you can see below, consider we want to create two tag, one is user tag with name and isMale attribute, another is system tag with size attribute.
Objects.equal(Object, Object) Invoking this method then it will avoid the risking of NullPointerException when we need to compare two object whether they equal.
Optional<T> is a way of replacing a nullable T reference with a non-null value. An Optional may either contain a non-null T reference (in which case we say the reference is “present”), or it may contain nothing (in which case we say the reference is “absent”). It is never said to “contain null.”
There are four builidng blocks for Android Application:
Activity
Intent Receiver
Service
Content Provider
But Not every application needs have all them.
AndroidManifest.xml is XML file, it contains some information that where you declare the components of your application and what their capabilities and requirements are.
The contents of files are not actually stored in the index (.git/index) or in commit objects. Rather, each file is stored in the object database (.git/objects) as a blob, identified by its SHA-1 hash. The index file lists the filenames along with the identifier of the associated blob, as well as some other data. For commits, there is an additional data type, a tree, also identified by its hash. Trees correspond to directories in the working directory, and contain a list of trees and blobs corresponding to each filename within that directory. Each commit stores the identifier of its top-level tree, which in turn contains all of the blobs and other trees associated with that commit.
The reset command moves the current branch to another position, and optionally updates the stage and the working directory. It also is used to copy files from the history to the stage without touching the working directory.
If a commit is given with no filenames, the current branch is moved to that commit, and then the stage is updated to match this commit. If –hard is given, the working directory is also updated. If –soft is given, neither is updated.
A rebase is an alternative to a merge for combining multiple branches. Whereas a merge creates a single commit with two parents, leaving a non-linear history, a rebase replays the commits from the current branch onto another, leaving a linear history. In essence, this is an automated way of performing several cherry-picks in a row.