public static boolean equals(Result result1, Result result2) { Assert.notNull(result1, "Result1 must be specified"); Assert.notNull(result2, "Result2 must be specified"); Assert.notNull(result1.getName(), "Result1 name must be specified"); Assert.notNull(result2.getName(), "Result2 name must be specified"); Assert.notNull(result1.getType(), "Result1 type must be specified"); Assert.notNull(result2.getType(), "Result2 type must be specified"); if (!result1.getName().equals(result2.getName())) return false; if (!result1.getType().equals(result2.getType())) return false; return true; }
public static Result clone(Result result) { if (result == null) return null; Result clone = create(); clone.setType(ObjectUtil.clone(result.getType())); clone.setName(ObjectUtil.clone(result.getName())); clone.setKey(ObjectUtil.clone(result.getKey())); clone.setConstruct(ObjectUtil.clone(result.getConstruct())); clone.setRequired(ObjectUtil.clone(result.getRequired())); return clone; }