/** * Tests object equality. * @param obj The <code>GroupAttrName</code> instance to test. * @return Whether equal. */ @Override public boolean equals( Object obj ) { if ( obj == null || !( obj instanceof GroupAttrName ) ) { return false; } GroupAttrName<?> to = (GroupAttrName<?>) obj; if (groupId.equals( to.groupId )) { if (attrName == null && to.attrName == null) { return true; } else if (attrName == null || to.attrName == null) { return false; } return attrName.equals( to.attrName ); } return false; }
/** * Internal method used for group functionality. * <p> * @param group * @param name * @return GroupAttrName */ private GroupAttrName<K> getGroupAttrName( String group, K name ) { GroupId gid = new GroupId( this.getCacheControl().getCacheName(), group ); return new GroupAttrName<K>( gid, name ); }
/** * Gets the set of keys of objects currently in the group. * <p> * @param group * @return A Set of keys. */ @Override public Set<K> getGroupKeys( String group ) { Set<K> groupKeys = new HashSet<K>(); GroupId groupId = new GroupId( this.getCacheControl().getCacheName(), group ); for (GroupAttrName<K> gan : this.getCacheControl().getKeySet()) { if (gan.groupId.equals( groupId )) { groupKeys.add( gan.attrName ); } } return groupKeys; }
/** * Internal method used for group functionality. * <p> * @param cacheName * @param group * @param name * @return GroupAttrName */ private GroupAttrName<String> getGroupAttrName( String cacheName, String group, String name ) { GroupId gid = new GroupId( cacheName, group ); return new GroupAttrName<String>( gid, name ); }
/** * Gets the set of keys of objects currently in the group. * <p> * @param group * @return A Set of keys. */ @Override public Set<K> getGroupKeys( String group ) { Set<K> groupKeys = new HashSet<K>(); GroupId groupId = new GroupId( this.getCacheControl().getCacheName(), group ); for (GroupAttrName<K> gan : this.getCacheControl().getKeySet()) { if (gan.groupId.equals( groupId )) { groupKeys.add( gan.attrName ); } } return groupKeys; }
private GroupAttrName<String> getGroupAttrName(String group, String name) { GroupId gid = new GroupId(groupCacheAccess.getCacheControl() .getCacheName(), group); return new GroupAttrName<String>(gid, name); }
/** * Tests object equality. * @param obj The <code>GroupAttrName</code> instance to test. * @return Whether equal. */ @Override public boolean equals( Object obj ) { if ( obj == null || !( obj instanceof GroupAttrName ) ) { return false; } GroupAttrName<?> to = (GroupAttrName<?>) obj; if (groupId.equals( to.groupId )) { if (attrName == null && to.attrName == null) { return true; } else if (attrName == null || to.attrName == null) { return false; } return attrName.equals( to.attrName ); } return false; }
/** * Internal method used for group functionality. * <p> * @param group * @param name * @return GroupAttrName */ private GroupAttrName<K> getGroupAttrName( String group, K name ) { GroupId gid = new GroupId( this.getCacheControl().getCacheName(), group ); return new GroupAttrName<K>( gid, name ); }
if ( k instanceof GroupAttrName && ( (GroupAttrName<?>) k ).groupId.equals( key ) )
log.error( "GroupID hashcode=" + name.groupId.hashCode() ); log.error( "GroupID.class=" + name.groupId.getClass() ); log.error( "AttrName hashcode=" + name.attrName.hashCode() );
/** * Internal method used for group functionality. * <p> * * @param cacheName * @param group * @param name * @return GroupAttrName */ private GroupAttrName<String> getGroupAttrName(String cacheName, String group, String name) { GroupId gid = new GroupId(cacheName, group); return new GroupAttrName<String>(gid, name); }
if (k instanceof GroupAttrName && ((GroupAttrName<?>) k).groupId.equals(key))
log.error( "GroupID hashcode=" + name.groupId.hashCode() ); log.error( "GroupID.class=" + name.groupId.getClass() ); log.error( "AttrName hashcode=" + name.attrName.hashCode() );
/** * Internal method used for group functionality. * <p> * * @param cacheName * @param group * @param name * @return GroupAttrName */ private GroupAttrName<String> getGroupAttrName(String cacheName, String group, String name) { GroupId gid = new GroupId(cacheName, group); return new GroupAttrName<String>(gid, name); }
((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId) )
log.error( "GroupID hashcode=" + name.groupId.hashCode() ); log.error( "GroupID.class=" + name.groupId.getClass() ); log.error( "AttrName hashcode=" + name.attrName.hashCode() );
GroupAttrName<String> groupKey = new GroupAttrName<String>(new GroupId("test", "group"), "key"); ICacheElement<GroupAttrName<String>, String> element = new CacheElement<GroupAttrName<String>, String>( "test", groupKey, "value1" );
((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId) )