Java org.apache.commons.lang3.builder CompareToBuilder fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang3.builder CompareToBuilder fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang3.builder CompareToBuilder.

The text is from its open source code.

Constructor

CompareToBuilder()

Constructor for CompareToBuilder.

Starts off assuming that the objects are equal.

Method

CompareToBuilderappend(final Object lhs, final Object rhs)

Appends to the builder the comparison of two Objects.

  1. Check if lhs == rhs
  2. Check if either lhs or rhs is null, a null object is less than a non-null object
  3. Check the object contents

lhs must either be an array or implement Comparable .

CompareToBuilderappend(final long lhs, final long rhs)
Appends to the builder the comparison of two longs.
CompareToBuilderappend(final int lhs, final int rhs)
Appends to the builder the comparison of two ints.
CompareToBuilderappend(final short lhs, final short rhs)
Appends to the builder the comparison of two shorts.
CompareToBuilderappend(final char lhs, final char rhs)
Appends to the builder the comparison of two chars.
CompareToBuilderappend(final byte lhs, final byte rhs)
Appends to the builder the comparison of two bytes.
CompareToBuilderappend(final double lhs, final double rhs)

Appends to the builder the comparison of two doubles.

This handles NaNs, Infinities, and -0.0.

It is compatible with the hash code generated by HashCodeBuilder.

CompareToBuilderappend(final float lhs, final float rhs)

Appends to the builder the comparison of two floats.

This handles NaNs, Infinities, and -0.0.

It is compatible with the hash code generated by HashCodeBuilder.

CompareToBuilderappend(final boolean lhs, final boolean rhs)
Appends to the builder the comparison of two booleanss.
CompareToBuilderappend(final Object[] lhs, final Object[] rhs)

Appends to the builder the deep comparison of two Object arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a short length array is less than a long length array
  4. Check array contents element by element using #append(Object,Object,Comparator)

This method will also will be called for the top level of multi-dimensional, ragged, and multi-typed arrays.

CompareToBuilderappend(final long[] lhs, final long[] rhs)

Appends to the builder the deep comparison of two long arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(long,long)
CompareToBuilderappend(final int[] lhs, final int[] rhs)

Appends to the builder the deep comparison of two int arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(int,int)
CompareToBuilderappend(final short[] lhs, final short[] rhs)

Appends to the builder the deep comparison of two short arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(short,short)
CompareToBuilderappend(final char[] lhs, final char[] rhs)

Appends to the builder the deep comparison of two char arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(char,char)
CompareToBuilderappend(final byte[] lhs, final byte[] rhs)

Appends to the builder the deep comparison of two byte arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(byte,byte)
CompareToBuilderappend(final double[] lhs, final double[] rhs)

Appends to the builder the deep comparison of two double arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(double,double)
CompareToBuilderappend(final float[] lhs, final float[] rhs)

Appends to the builder the deep comparison of two float arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(float,float)
CompareToBuilderappend(final boolean[] lhs, final boolean[] rhs)

Appends to the builder the deep comparison of two boolean arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a shorter length array is less than a longer length array
  4. Check array contents element by element using #append(boolean,boolean)
CompareToBuilderappend(final Object lhs, final Object rhs, final Comparator comparator)

Appends to the builder the comparison of two Objects.

  1. Check if lhs == rhs
  2. Check if either lhs or rhs is null, a null object is less than a non-null object
  3. Check the object contents

If lhs is an array, array comparison methods will be used.

CompareToBuilderappend(final Object[] lhs, final Object[] rhs, final Comparator comparator)

Appends to the builder the deep comparison of two Object arrays.

  1. Check if arrays are the same using ==
  2. Check if for null, null is less than non-null
  3. Check array length, a short length array is less than a long length array
  4. Check array contents element by element using #append(Object,Object,Comparator)

This method will also will be called for the top level of multi-dimensional, ragged, and multi-typed arrays.

CompareToBuilderappendSuper(final int superCompareTo)

Appends to the builder the compareTo(Object) result of the superclass.

Integerbuild()
Returns a negative Integer, a positive Integer, or zero as the builder has judged the "left-hand" side as less than, greater than, or equal to the "right-hand" side.
intreflectionCompare(final Object lhs, final Object rhs)

Compares two Objects via reflection.

Fields can be private, thus AccessibleObject.setAccessible is used to bypass normal access control checks.

intreflectionCompare(final Object lhs, final Object rhs, final boolean compareTransients)

Compares two Objects via reflection.

Fields can be private, thus AccessibleObject.setAccessible is used to bypass normal access control checks.

intreflectionCompare(final Object lhs, final Object rhs, final Collection excludeFields)

Compares two Objects via reflection.

Fields can be private, thus AccessibleObject.setAccessible is used to bypass normal access control checks.

intreflectionCompare(final Object lhs, final Object rhs, final String... excludeFields)

Compares two Objects via reflection.

Fields can be private, thus AccessibleObject.setAccessible is used to bypass normal access control checks.

inttoComparison()
Returns a negative integer, a positive integer, or zero as the builder has judged the "left-hand" side as less than, greater than, or equal to the "right-hand" side.