Methods Summary |
---|
protected void | initialize()
// Builder and Builder2 contain the same content
builder = new BuilderBean();
builder.setProp1("One");
builder.setProp2("Two");
builder2 = new BuilderBean();
builder2.setProp1("One");
builder2.setProp2("Two");
builder3 = new BuilderBean();
builder3.setProp1("Uno");
builder3.setProp2("Dos");
|
public static void | main(java.lang.String[] pArgs)
BuilderBeanExample example = new BuilderBeanExample();
example.initialize();
example.testToString();
example.testHashCode();
example.testEquals();
example.testCompare();
|
public void | testCompare()
logger.info(
"builder compareTo builder2: " + builder.compareTo(builder2));
logger.info(
"builder compareTo builder3: " + builder.compareTo(builder3));
|
public void | testEquals()
logger.info("builder equals builder2: " + builder.equals(builder2));
logger.info("builder equals builder3: " + builder.equals(builder3));
|
public void | testHashCode()
logger.info("HashCodeBuilder: " + builder.hashCode());
|
public void | testToString()
logger.info("ToStringBuilder: " + builder.toString());
|