public static Collection filter(Collection c, Predicate p) { Iterator it = c.iterator(); while (it.hasNext()) { if (!p.evaluate(it.next())) { it.remove(); } } return c; }
public static Collection filter(Collection c, Predicate p) { Iterator it = c.iterator(); while (it.hasNext()) { if (!p.evaluate(it.next())) { it.remove(); } } return c; }
public String getClassName(String prefix, String source, Object key, Predicate names) { if (prefix == null) { prefix = "net.sf.cglib.empty.Object"; } else if (prefix.startsWith("java")) { prefix = "$" + prefix; } String base = prefix + "$$" + source.substring(source.lastIndexOf('.') + 1) + getTag() + "$$" + Integer.toHexString(STRESS_HASH_CODE ? 0 : key.hashCode()); String attempt = base; int index = 2; while (names.evaluate(attempt)) attempt = base + "_" + index++; return attempt; }
public String getClassName(String prefix, String source, Object key, Predicate names) { if (prefix == null) { prefix = "net.sf.cglib.empty.Object"; } else if (prefix.startsWith("java")) { prefix = "$" + prefix; } String base = prefix + "$$" + source.substring(source.lastIndexOf('.') + 1) + getTag() + "$$" + Integer.toHexString(STRESS_HASH_CODE ? 0 : key.hashCode()); String attempt = base; int index = 2; while (names.evaluate(attempt)) attempt = base + "_" + index++; return attempt; }
@Override public String getClassName(String prefix, String source, Object key, Predicate names) { if (prefix == null) { prefix = "net.sf.cglib.empty.Object"; } else if (prefix.startsWith("java")) { prefix = "_" + prefix; } String base = prefix + "_" + source.substring(source.lastIndexOf('.') + 1) + getTag() + "_" + Integer.toHexString(key.hashCode()); String attempt = base; int index = 2; while (names.evaluate(attempt)) attempt = base + "_" + index++; return attempt; }
public static Collection filter(Collection c, Predicate p) { Iterator it = c.iterator(); while (it.hasNext()) { if (!p.evaluate(it.next())) { it.remove(); } } return c; }
public static Collection filter(Collection c, Predicate p) { Iterator it = c.iterator(); while (it.hasNext()) { if (!p.evaluate(it.next())) { it.remove(); } } return c; }
public static Collection filter(Collection c, Predicate p) { Iterator it = c.iterator(); while (it.hasNext()) { if (!p.evaluate(it.next())) { it.remove(); } } return c; }
public String getClassName(String prefix, String source, Object key, Predicate names) { if (prefix == null) { prefix = "net.sf.cglib.empty.Object"; } else if (prefix.startsWith("java")) { prefix = "$" + prefix; } String base = prefix + "$$" + source.substring(source.lastIndexOf('.') + 1) + getTag() + "$$" + Integer.toHexString(key.hashCode()); String attempt = base; int index = 2; while (names.evaluate(attempt)) attempt = base + "_" + index++; return attempt; }
@Override public String getClassName(String prefix, final String source, final Object key, final Predicate names) { if (prefix == null) { prefix = "net.sf.cglib.empty.Object"; } else if (prefix.startsWith("java")) { prefix = "_" + prefix; } final String base = prefix + "_" + source.substring(source.lastIndexOf('.') + 1) + getTag() + "_" + Integer.toHexString(key.hashCode()); String attempt = base; int index = 2; while (names.evaluate(attempt)) { attempt = base + "_" + index++; } return attempt; }
public String getClassName(String prefix, String source, Object key, Predicate names) { if (prefix == null) { prefix = "net.sf.cglib.empty.Object"; } else if (prefix.startsWith("java")) { prefix = "$" + prefix; } String base = prefix + "$$" + source.substring(source.lastIndexOf('.') + 1) + getTag() + "$$" + Integer.toHexString(key.hashCode()); String attempt = base; int index = 2; while (names.evaluate(attempt)) attempt = base + "_" + index++; return attempt; }
public String getClassName(String prefix, String source, Object key, Predicate names) { if (prefix == null) { prefix = "net.sf.cglib.empty.Object"; } else if (prefix.startsWith("java")) { prefix = "$" + prefix; } String base = prefix + "$$" + source.substring(source.lastIndexOf('.') + 1) + getTag() + "$$" + Integer.toHexString(key.hashCode()); String attempt = base; int index = 2; while (names.evaluate(attempt)) attempt = base + "_" + index++; return attempt; }