equals(Object), toString(), hashCode(), and compareTo(Object) methods.
These classes are not thread-safe.
When you write a hashCode(), do you check Bloch's Effective Java? No?
You just hack in a quick number?
Well org. will save your day.
It, and its buddies (org., org., org.), take care of the nasty bits while you focus on the important bits, like which fields will go into making up the hash code.
Object#equals(Object), Object#toString(), Object#hashCode(), Comparable#compareTo(Object)
| Modifier and Type | Interface and Description |
|---|---|
| public interface | Builder<
the type of object that the builder will construct or compute. T>The Builder interface is designed to designate a class as a builder object in the Builder design pattern. |
| public interface |
| Modifier and Type | Annotation and Description |
|---|---|
| public @interface | DiffExclude
Excludes a field from being used by the |
| public @interface | EqualsExclude
Excludes a field from being used by the various |
| public @interface | HashCodeExclude
Exclude a field from being used by the various |
| public @interface | ToStringExclude
Excludes a field from being used by the |
| public @interface | ToStringSummary
Use this annotation on the fields to get the summary instead of the detailed
information when using |
| Modifier and Type | Class and Description |
|---|---|
| public abstract class | AbstractSupplier<
The type of results supplied by this supplier. T, the type of builder. B extends AbstractSupplierThe kind of thrown exception or error. E extends Throwable>Abstracts supplying an instance of |
| public class | CompareToBuilder
Assists in implementing |
| public abstract class | |
| public class | DiffBuilder<
type of the left and right object. T>Assists in implementing |
| public class | DiffResult<
type of the left and right object. T>A |
| public class | EqualsBuilder
Assists in implementing |
| public class | HashCodeBuilder
Assists in implementing |
| pack-priv class | IDKey
Wrap an identity key (System.identityHashCode()) so that an object can only be equal() to itself. |
| public class | MultilineRecursiveToStringStyle
Works with |
| public class | RecursiveToStringStyle
Works with |
| pack-priv class | Reflection
Package-private reflection code. |
| public class | ReflectionDiffBuilder<
type of the left and right object to diff. T>Assists in implementing |
| public class | ReflectionToStringBuilder
Assists in implementing |
| public class | StandardToStringStyle
Works with |
| public class | ToStringBuilder
Assists in implementing |
| public abstract class | ToStringStyle
Controls |