Advertisement
Guest User

Book

a guest
Sep 27th, 2011
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. package com.gridview;
  2.  
  3. public class Book implements Comparable<Book> {
  4.     String symbol;
  5.     String msgtype;
  6.     String price;
  7.      public int compareTo(Book bk){
  8.          return symbol.compareTo(bk.symbol);
  9.      }
  10.     public Book(String sybl, String mtype, String price) {
  11.         this.symbol = sybl;
  12.         this.msgtype = mtype;
  13.         this.price=price;
  14.     }
  15.     public String getTitle() {
  16.         return symbol;
  17.     }
  18.     public void setTitle(String title) {
  19.         this.symbol= title;
  20.     }
  21.     public String getAuthor() {
  22.         return msgtype;
  23.     }
  24.     public void setAuthor(String author) {
  25.         this.msgtype = author;
  26.     }
  27.     public String getPrice() {
  28.         return price;
  29.        
  30.     }
  31.     public void setPrice(String price) {
  32.         this.price=price;
  33.     }
  34.  
  35. }
  36.  
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement