Skip to main content

Blog Archive for evanx during June 2007

Let's look at neatening up those messy equals() and hashCode() methods in our entities. Entity Equals: A part of the "Jelly Beans" part of a trilogy in 42 parts" public class Feed {    private int id;    private String uri;    ...    private Comparable[] values() {        return new Comparable[] {...
I have one very simple rule for design, namely to create as many classes as possible! Let's name this "Evan's Rule of Simplicity by Multiplicity." So I just noticed a simple cue to refactor out a class. Consider the following GUI construction. public class MainView {    JTabbedPane mainTabbedPane = new JTabbedPane();    ...    DefaultMutableTreeNode...