tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r800261 - /tuscany/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java
Date Mon, 03 Aug 2009 08:48:43 GMT
Author: slaws
Date: Mon Aug  3 08:48:43 2009
New Revision: 800261

URL: http://svn.apache.org/viewvc?rev=800261&view=rev
Log:
Add a toString() operation to show the details of a trip

Modified:
    tuscany/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java

Modified: tuscany/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java?rev=800261&r1=800260&r2=800261&view=diff
==============================================================================
--- tuscany/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java
(original)
+++ tuscany/sandbox/travelsample/contributions/common-contribution/src/main/java/scatours/common/TripItem.java
Mon Aug  3 08:48:43 2009
@@ -206,6 +206,21 @@
     }
     
     @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){



Mime
View raw message