I have a series of classes that represent entities. As I'm trying to follow functional principles, they're methodless and their properties aren't meant to be changed once set.
Implementing equals would be needed, in a straightforward way - two instances are considered equal if so are their properties, with no extra logic.
I'm inexperienced in implementing hashCode, so I'm not sure if it could be programatically implemented.
Coding such classes seems unnecessarily verbose to me - looks like has to be a lightweight alternative to
public class SomeEntity {
public final int prop0;
public final long prop1;
// ...
public final String propN;
@Override
public boolean equals(Object arg){
// check check that arg instanceof Entity,
// and that each of their properties equal, one by one.
}
}
. Are there any methods, annotations, collections or even compilers that can do this for me?

staticexternal methods can cause additional objects to be created, that you might not need to otherwise. For instance, when creating an object that contains aList, you need to copy it (to prevent outside changes). For a method that changes some other attribute than that list - 1) If it's an internal method, the existing list copy can be simply re-used when the new object is created. 2) If it's an external method, it'll need to re-copy the list (or use an exposed non-copying constructor). – Clockwork-Muse Dec 21 '11 at 19:47