nu.studer.gradle.util
[Java] Class Objects
java.lang.Object
nu.studer.gradle.util.Objects
public final class Objects
Copyright 2014 Etienne Studer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|
Method Summary |
static int
|
deepHashCode(java.lang.Object element)
Calculates a hash code for the given object by traversing recursively into each field that does not contain
an java.lang.Object#hashCode() implementation.
|
|
Methods inherited from class java.lang.Object
|
| java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
deepHashCode
public static int deepHashCode(java.lang.Object element)
- Calculates a hash code for the given object by traversing recursively into each field that does not contain
an java.lang.Object#hashCode() implementation. java.util.Collections and java.util.Maps are always traversed recursively.
- Parameters:
element - the element for which to create the deep hash code
- Returns:
- the deep hash code
Groovy Documentation