KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > db4odoc > callbacks > Car


1 /* Copyright (C) 2004 - 2006 db4objects Inc. http://www.db4o.com */
2
3 package com.db4odoc.callbacks;
4
5 public class Car {
6     private String JavaDoc model;
7     private Pilot pilot;
8     
9     public Car(String JavaDoc model, Pilot pilot) {
10         this.model=model;
11         this.pilot=pilot;
12     }
13
14     public Pilot getPilot() {
15         return pilot;
16     }
17
18     public String JavaDoc getModel() {
19         return model;
20     }
21
22     public String JavaDoc toString() {
23         return model+"["+pilot+"]";
24     }
25 }
26
Popular Tags