ppamorim

Untitled

Sep 26th, 2014
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. //Isso é um model básico
  2.  
  3. public class MenuItem {
  4.  
  5.     private int image;
  6.     private String name;
  7.     private int position;
  8.  
  9.     //Construtor
  10.     public MenuItem(int position, int image, String name) {
  11.         this.image = image;
  12.         this.name = name;
  13.         this.position = position;
  14.     }
  15.  
  16.     //Metodos set e get
  17.  
  18.     public int getPosition() {
  19.         return position;
  20.     }
  21.  
  22.     public void setPosition(int position) {
  23.         this.position = position;
  24.     }
  25.  
  26.     public void setImage(int image) {
  27.         this.image = image;
  28.     }
  29.  
  30.     public void setName(String name) {
  31.         this.name = name;
  32.     }
  33.  
  34.     public String getName() {
  35.         return name;
  36.     }
  37.  
  38.     public int getImage() {
  39.         return image;
  40.     }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment