I'm "trying" by cloning the following class:
public class CadHorario implements Serializable, Cloneable {
private int cdHorario;
...
private Date horarioInicio;
private Date horarioFim;
private DiasDaSemana diasDaSemana;
...
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
}
Class DaysDay Week:
public class DiasDaSemana implements Cloneable {
private boolean seg;
private boolean ter;
private boolean qua;
private boolean qui;
private boolean sex;
private boolean sab;
private boolean dom;
...
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
}
Some attribute is cloning, but others like DiasDaSemana
is not cloning.
I'm cloning like this:
CadHorario clonado = (CadHorario) horario.clone();
Could anyone help me?