summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/contributions/common-contribution
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-03 08:48:43 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-03 08:48:43 +0000
commit2680abf5b80548b8fefd94f59599879dc24592a1 (patch)
tree4267eeea23a5db4c95526282845a009d70db81d2 /sandbox/travelsample/contributions/common-contribution
parentd108b5717f676ddd464fad9414edcb939f36fb3a (diff)
Add a toString() operation to show the details of a trip
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@800261 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/travelsample/contributions/common-contribution')
-rw-r--r--sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java b/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java
index 5275f331a9..afef47bf33 100644
--- a/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java
+++ b/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java
@@ -206,6 +206,21 @@ public class TripItem {
}
@Override
+ public String toString(){
+ String tripString = "Trip: id " + this.tripId +
+ " type " + this.type +
+ " name " + this.name +
+ " description " + this.description +
+ " location " + this.location +
+ " fromDate " + this.fromDate +
+ " toDate " + this.toDate +
+ " price " + this.price +
+ " currency " + this.currency +
+ " link " + this.link;
+ return tripString;
+ }
+
+ @Override
public boolean equals(Object obj) {
if (obj instanceof TripItem){