Created
July 14, 2018 12:48
-
-
Save VaidotasK/ba6e676fd6e9102b70b52d94a7ce40e0 to your computer and use it in GitHub Desktop.
Custom class Place
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
// For pub Fragment | |
public Place(String name, String address, String price, String description) { | |
this.name = name; | |
this.address = address; | |
this.price = price; | |
this.description = description; | |
} | |
public Place(String name, int placeImageResourceId, String address, String price, String description) { | |
this.name = name; | |
this.placeImageResourceId = placeImageResourceId; | |
this.address = address; | |
this.price = price; | |
this.description = description; | |
} | |
public String getPlaceName() { | |
return name; | |
} | |
public int getPlaceImageResourceId() { | |
return placeImageResourceId; | |
} | |
public String getPlaceDescription() { | |
return description; | |
} | |
public String getPlacePrice() { | |
return price; | |
} | |
public String getPlaceAddress() { | |
return address; | |
} | |
public boolean hasImage() { | |
return placeImageResourceId != NO_IMAGE; | |
} | |
public boolean hasDescription() { | |
return description != NO_DESCRIPTION; | |
} | |
public boolean hasPlacePrice() { | |
return price != NO_PRICE; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment