Created
November 16, 2020 11:01
-
-
Save dev-aritra/2ab1468bb792772a567faa4c42f4b51d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Store { | |
private String id; | |
private final String name; | |
private final Location location; | |
public Store(String name, Location location) { | |
this.name = name; | |
this.location = location; | |
} | |
public Store(String id, String name, Location location) { | |
this.id = id; | |
this.name = name; | |
this.location = location; | |
} | |
public boolean isValid() { | |
return StringUtils.hasText(name) && location.isValid(); | |
} | |
public String getId() { | |
return id; | |
} | |
public String getName() { | |
return name; | |
} | |
public Location getLocation() { | |
return location; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment