/** * 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; }
/** * 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; }
if ( k instanceof GroupAttrName && ( (GroupAttrName<?>) k ).groupId.equals( key ) )
if (k instanceof GroupAttrName && ((GroupAttrName<?>) k).groupId.equals(key))
((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId) )
((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId) )
if (k instanceof GroupAttrName && ((GroupAttrName<?>) k).groupId.equals(key))
((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId))
K k = entry.getKey(); if (k instanceof GroupAttrName && ((GroupAttrName<?>) k).groupId.equals(((GroupAttrName<?>) key).groupId))
K k = entry.getKey(); if (k instanceof GroupAttrName && ((GroupAttrName<?>) k).groupId.equals(((GroupAttrName<?>) key).groupId))
((GroupAttrName<?>)k).groupId.equals(((GroupAttrName<?>)key).groupId))
/** * 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; }
/** * 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; }