Advertisement
sombriks

Pojo.java

Sep 3rd, 2011
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.87 KB | None | 0 0
  1. package teste;
  2.  
  3. import java.util.LinkedList;
  4. import java.util.List;
  5.  
  6. import javax.xml.bind.annotation.XmlAccessType;
  7. import javax.xml.bind.annotation.XmlAccessorType;
  8. import javax.xml.bind.annotation.XmlRootElement;
  9.  
  10. @XmlRootElement
  11. @XmlAccessorType(XmlAccessType.FIELD)
  12. public class Pojo {
  13.  
  14.     private String aaa;
  15.     private int q;
  16.     private List<Foo>cont;
  17.  
  18.     public Pojo() {
  19.     }
  20.  
  21.     public Pojo(int k) {
  22.         aaa = "teste";
  23.         q = k;
  24.         cont = new LinkedList<Foo>();
  25.         cont.add(new Foo(4.5));
  26.         cont.add(new Foo(14.3));
  27.         cont.add(new Foo(7));
  28.        
  29.     }
  30.  
  31.     public String getAaa() {
  32.         return aaa;
  33.     }
  34.  
  35.     public void setAaa(String aaa) {
  36.         this.aaa = aaa;
  37.     }
  38.    
  39.     public int getQ() {
  40.         return q;
  41.     }
  42.    
  43.     public void setQ(int q) {
  44.         this.q = q;
  45.     }
  46.    
  47.     public List<Foo> getCont() {
  48.         return cont;
  49.     }
  50.    
  51.     public void setCont(List<Foo> cont) {
  52.         this.cont = cont;
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement