Andrei Branza - replaced tabs si 4 spaces. eliminated not needed clone method in Address class from shallow and deep copy
This commit is contained in:
parent
9a421159ea
commit
65437b41ad
@ -7,19 +7,9 @@ import lombok.*;
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode
|
||||
@ToString
|
||||
public class Address implements Cloneable
|
||||
{
|
||||
public class Address implements Cloneable {
|
||||
|
||||
private String streetName;
|
||||
private String cityName;
|
||||
|
||||
@Override
|
||||
public Address clone() {
|
||||
try
|
||||
{
|
||||
return (Address) super.clone();
|
||||
} catch (CloneNotSupportedException cloneException)
|
||||
{
|
||||
throw new RuntimeException(cloneException);
|
||||
}
|
||||
}
|
||||
}
|
@ -7,8 +7,8 @@ import lombok.*;
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode
|
||||
@ToString
|
||||
public class Person implements Cloneable
|
||||
{
|
||||
public class Person implements Cloneable {
|
||||
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private Address address;
|
||||
|
@ -7,19 +7,9 @@ import lombok.*;
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode
|
||||
@ToString
|
||||
public class Address implements Cloneable
|
||||
{
|
||||
public class Address implements Cloneable {
|
||||
|
||||
private String streetName;
|
||||
private String cityName;
|
||||
|
||||
@Override
|
||||
public Address clone() {
|
||||
try
|
||||
{
|
||||
return (Address) super.clone();
|
||||
} catch (CloneNotSupportedException cloneException)
|
||||
{
|
||||
throw new RuntimeException(cloneException);
|
||||
}
|
||||
}
|
||||
}
|
@ -7,8 +7,8 @@ import lombok.*;
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode
|
||||
@ToString
|
||||
public class Person implements Cloneable
|
||||
{
|
||||
public class Person implements Cloneable {
|
||||
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private Address address;
|
||||
|
Loading…
x
Reference in New Issue
Block a user