| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static interface | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private ObjectUtility. | |
| private ObjectUtility. | |
| private static ObjectUtility | |
| private int | |
| private int | |
| private boolean | |
| private ObjectUtility. | |
| private ObjectUtility. | |
| private static ObjectUtility | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | |
| private static void | |
| private void | |
| public static String | |
| public static Object | concatenateArrays(Object arr1, Object arr2)
If arr1 and arr2 are both arrays of the same component type, return an array of that component type that consists of the elements of arr1 followed by the elements of arr2. |
| private static void | |
| public static String | defaultObjectToString(Object object)
A convenience method that gives the default behavior: use indenting to display the object's structure and do not use built-in toString methods. |
| public static void | |
| private static void | |
| private static boolean | |
| private static boolean | |
| private static boolean | |
| public static boolean | |
| private static boolean | |
| private static boolean | |
| private static boolean | |
| private static boolean | |
| private Field[] | |
| private void | |
| private void | |
| public static void | |
| public static ObjectUtility | make(boolean useToString, boolean isIndenting, int initialLevel, int increment)
Construct an Utility instance with the desired objectToString behavior. |
| public static ObjectUtility | make(boolean useToString, boolean isIndenting)
Construct an Utility instance with the desired objectToString behavior. |
| public static ObjectUtility | make()
Get the standard Utility object that supports objectToString with indented display and no use of toString() methods. |
| private boolean | |
| public String | |
| private void | |
| private static void |
| classToPrinter | back to summary |
|---|---|
| private ObjectUtility. | |
| collectionPrinter | back to summary |
|---|---|
| private ObjectUtility. | |
| compact | back to summary |
|---|---|
| private static ObjectUtility compact | |
| increment | back to summary |
|---|---|
| private int increment | |
| initialLevel | back to summary |
|---|---|
| private int initialLevel | |
| isIndenting | back to summary |
|---|---|
| private boolean isIndenting | |
| mapPrinter | back to summary |
|---|---|
| private ObjectUtility. | |
| propertiesPrinter | back to summary |
|---|---|
| private ObjectUtility. | |
| standard | back to summary |
|---|---|
| private static ObjectUtility standard | |
| useToString | back to summary |
|---|---|
| private boolean useToString | |
| ObjectUtility | back to summary |
|---|---|
| private ObjectUtility(boolean useToString, boolean isIndenting, int initialLevel, int increment) | |
| a | back to summary |
|---|---|
| private static void a() | |
| b | back to summary |
|---|---|
| private static void b() | |
| c | back to summary |
|---|---|
| private static void c() | |
| checkPackageAccess | back to summary |
|---|---|
| private void checkPackageAccess(Class<T> cls) | |
| compactObjectToString | back to summary |
|---|---|
| public static String compactObjectToString(Object object) | |
| concatenateArrays | back to summary |
|---|---|
| public static Object concatenateArrays(Object arr1, Object arr2) If arr1 and arr2 are both arrays of the same component type, return an array of that component type that consists of the elements of arr1 followed by the elements of arr2. Throws IllegalArgumentException otherwise. | |
| d | back to summary |
|---|---|
| private static void d() | |
| defaultObjectToString | back to summary |
|---|---|
| public static String defaultObjectToString(Object object) A convenience method that gives the default behavior: use indenting to display the object's structure and do not use built-in toString methods. | |
| displayException | back to summary |
|---|---|
| public static void displayException(Throwable thr) | |
| e | back to summary |
|---|---|
| private static void e() | |
| equalArrays | back to summary |
|---|---|
| private static boolean equalArrays(Map<K, V> counterpart, Set<E> considered, Object[] arr1, Object[] arr2) | |
| equalLists | back to summary |
|---|---|
| private static boolean equalLists(Map<K, V> counterpart, Set<E> considered, List<E> list1, List<E> list2) | |
| equalMaps | back to summary |
|---|---|
| private static boolean equalMaps(Map<K, V> counterpart, Set<E> considered, Map<K, V> map1, Map<K, V> map2) | |
| equals | back to summary |
|---|---|
| public static boolean equals(Object obj1, Object obj2) | |
| equalSets | back to summary |
|---|---|
| private static boolean equalSets(Map<K, V> counterpart, Set<E> considered, Set<E> set1, Set<E> set2) | |
| equalsHelper | back to summary |
|---|---|
| private static boolean equalsHelper(Map<K, V> counterpart, Set<E> considered, Object obj1, Object obj2) | |
| equalsObject | back to summary |
|---|---|
| private static boolean equalsObject(Map<K, V> counterpart, Set<E> considered, Class<T> cls, Object obj1, Object obj2) | |
| equalsObjectFields | back to summary |
|---|---|
| private static boolean equalsObjectFields(Map<K, V> counterpart, Set<E> considered, Class<T> cls, Object obj1, Object obj2) | |
| getDeclaredFields | back to summary |
|---|---|
| private Field[] getDeclaredFields(Class<T> cls) | |
| handleArray | back to summary |
|---|---|
| private void handleArray(IdentityHashMap<K, V> printed, ObjectWriter result, Object obj) | |
| handleObject | back to summary |
|---|---|
| private void handleObject(IdentityHashMap<K, V> printed, ObjectWriter result, Object obj) | |
| main | back to summary |
|---|---|
| public static void main(String[] args) | |
| make | back to summary |
|---|---|
| public static ObjectUtility make(boolean useToString, boolean isIndenting, int initialLevel, int increment) Construct an Utility instance with the desired objectToString behavior. | |
| make | back to summary |
|---|---|
| public static ObjectUtility make(boolean useToString, boolean isIndenting) Construct an Utility instance with the desired objectToString behavior. | |
| make | back to summary |
|---|---|
| public static ObjectUtility make() Get the standard Utility object that supports objectToString with indented display and no use of toString() methods. | |
| mustUseToString | back to summary |
|---|---|
| private boolean mustUseToString(Class<T> cls) | |
| objectToString | back to summary |
|---|---|
| public String objectToString(Object obj) objectToString handles display of arbitrary objects. It correctly handles objects whose elements form an arbitrary graph. It uses reflection to display the contents of any kind of object. An object's toString() method may optionally be used, but the default is to ignore all toString() methods except for those defined for primitive types, primitive type wrappers, and strings. | |
| objectToStringHelper | back to summary |
|---|---|
| private void objectToStringHelper(IdentityHashMap<K, V> printed, ObjectWriter result, Object obj) | |
| sop | back to summary |
|---|---|
| private static void sop(String msg) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public void |
| data | back to summary |
|---|---|
| pack-priv ArrayList<E> data | |
| ClassMap | back to summary |
|---|---|
| public ClassMap() | |
| get | back to summary |
|---|---|
| public Object get(Class<T> cls) Return the first element of the ClassMap that is assignable to cls. The order is determined by the order in which the put method was called. Returns null if there is no match. | |
| put | back to summary |
|---|---|
| public void put(Class<T> cls, Object obj) Add obj to the map with key cls. Note that order matters, as the first match is returned. | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| back to summary | |
|---|---|
| public void print(IdentityHashMap<K, V> printed, ObjectWriter buff, Object obj) | |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int |
| Pair | back to summary |
|---|---|
| pack-priv Pair(Object obj1, Object obj2) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |