/** * This implementations expects the other object to be of type BeanComponentDefinition * as well, in addition to the superclass's equality requirements. */ @Override public boolean equals(Object other) { return (this == other || (other instanceof BeanComponentDefinition && super.equals(other))); }
/** * This implementations expects the other object to be of type BeanComponentDefinition * as well, in addition to the superclass's equality requirements. */ @Override public boolean equals(Object other) { return (this == other || (other instanceof BeanComponentDefinition && super.equals(other))); }
@Test public void beanDefinitionHolderEquality() { RootBeanDefinition bd = new RootBeanDefinition(TestBean.class); bd.setAbstract(true); bd.setLazyInit(true); bd.setScope("request"); BeanDefinitionHolder holder = new BeanDefinitionHolder(bd, "bd"); RootBeanDefinition otherBd = new RootBeanDefinition(TestBean.class); assertTrue(!bd.equals(otherBd)); assertTrue(!otherBd.equals(bd)); otherBd.setAbstract(true); otherBd.setLazyInit(true); otherBd.setScope("request"); BeanDefinitionHolder otherHolder = new BeanDefinitionHolder(bd, "bd"); assertTrue(holder.equals(otherHolder)); assertTrue(otherHolder.equals(holder)); assertTrue(holder.hashCode() == otherHolder.hashCode()); }
/** * This implementations expects the other object to be of type BeanComponentDefinition * as well, in addition to the superclass's equality requirements. */ @Override public boolean equals(Object other) { return (this == other || (other instanceof BeanComponentDefinition && super.equals(other))); }
/** * This implementations expects the other object to be of type BeanComponentDefinition * as well, in addition to the superclass's equality requirements. */ @Override public boolean equals(Object other) { return (this == other || (other instanceof BeanComponentDefinition && super.equals(other))); }