S - The concrete type of the smart object.public abstract class SmartObject<S extends SmartObject<S>>
extends java.lang.Object
implements java.lang.Comparable<S>, craterdog.core.Composite
Object class. It also adds a generics based copy() method that is
superior to the clone() method in many ways.| Constructor and Description |
|---|
SmartObject() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSerializableClass(java.lang.Class<?> serializable)
This protected method allows a subclass to add a class type that can be serialized using its
toString() method to the mappers.
|
protected void |
addSerializableClass(com.fasterxml.jackson.databind.Module module)
This protected method allows a subclass to add a Jackson module to the set of modules used by
the mappers.
|
int |
compareTo(S object) |
<T extends SmartObject<S>> |
copy()
This method should work for all objects.
|
boolean |
equals(java.lang.Object object)
This method determines whether or not two objects are equal.
|
int |
hashCode()
This method returns a hash code for the object based on its string form.
|
protected java.lang.String |
toExposedString()
This method behaves similarly to the
toString() method except that it
does not perform any censorship of sensitive attributes. |
java.lang.String |
toString()
This method returns a string containing a structured, human readable version of the object.
|
java.lang.String |
toString(java.lang.String indentation) |
public java.lang.String toString()
toString in interface craterdog.core.CompositetoString in class java.lang.Objectpublic java.lang.String toString(java.lang.String indentation)
toString in interface craterdog.core.Compositeprotected java.lang.String toExposedString()
toString() method except that it
does not perform any censorship of sensitive attributes. It should only be used when
the resulting output will not be stored or seen by anyone.public boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object to be compared with this object.public int compareTo(S object)
compareTo in interface java.lang.Comparable<S extends SmartObject<S>>public <T extends SmartObject<S>> T copy()
T - The concrete type of the smart object.public int hashCode()
hashCode in class java.lang.Objectprotected void addSerializableClass(java.lang.Class<?> serializable)
serializable - The type of class that can be serialized using its toString() method.protected void addSerializableClass(com.fasterxml.jackson.databind.Module module)
module - The type of class that can be serialized using its toString() method.Copyright © 2015 Crater Dog Technologies(TM). All rights reserved.