Java Code Examples for java.io.Serializable#hashCode()
The following examples show how to use
java.io.Serializable#hashCode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NodePropertyValue.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
@Override public int hashCode() { int h = 0; if (actualType != null) h = actualType.hashCode(); Serializable persistedValue = getPersistedValue(); if (persistedValue != null) h += 17 * persistedValue.hashCode(); return h; }
Example 2
Source File: FirstClassWithDependency.java From ArchUnit with Apache License 2.0 | 5 votes |
void first() { ClassHoldingDependencies instanceOne = new ClassHoldingDependencies(); Object someOtherObject = new Object(); Serializable someSerializable = new Serializable() { }; instanceOne.setSomeInt(1); someOtherObject.toString(); someSerializable.hashCode(); instanceOne.someInt = 5; }
Example 3
Source File: ObjectUtil.java From recheck with GNU Affero General Public License v3.0 | 4 votes |
public static int nextHashCode( final int previousHash, final Serializable attr ) { if ( attr == null ) { return previousHash; } return previousHash + attr.hashCode() ^ 31; }
Example 4
Source File: TransactionalCache.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public CacheRegionKey(String cacheRegion, Serializable cacheKey) { this.cacheRegion = cacheRegion; this.cacheKey = cacheKey; this.hashCode = cacheRegion.hashCode() + cacheKey.hashCode(); }
Example 5
Source File: CacheRegionKey.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public CacheRegionKey(String cacheRegion, Serializable cacheKey) { this.cacheRegion = cacheRegion; this.cacheKey = cacheKey; this.hashCode = cacheRegion.hashCode() + cacheKey.hashCode(); }
Example 6
Source File: CacheRegionValueKey.java From alfresco-repository with GNU Lesser General Public License v3.0 | 4 votes |
public CacheRegionValueKey(String cacheRegion, Serializable cacheValueKey) { this.cacheRegion = cacheRegion; this.cacheValueKey = cacheValueKey; this.hashCode = cacheRegion.hashCode() + cacheValueKey.hashCode(); }