/** * The id are what they are, not trimming 'upcasing' or other modifications will be done in this * method. * * @param expectedType The class of type T which is expected. * @param <V> the type to cast to if the casting fails, null will be returned. * @param ids to search the cache for * @return the {@link Identifiable} of the first matching id or <code>null</code> if it was not * found. */ public <V extends Identifiable> V getCachedIdentifiable(Class<V> expectedType, Identifiable ids) { if (ids == null) { return null; } return getCachedIdentifiable(expectedType, ids.getIdentifiers()); }