Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.42 KB | None | 0 0
  1.  
  2. import javafx.beans.property.DoubleProperty;
  3. import javafx.beans.property.IntegerProperty;
  4. import javafx.beans.property.SimpleDoubleProperty;
  5. import javafx.beans.property.SimpleIntegerProperty;
  6. import javafx.beans.property.SimpleStringProperty;
  7. import javafx.beans.property.StringProperty;
  8.  
  9. public class Ingredients {
  10.  
  11.     private IntegerProperty id;
  12.     private DoubleProperty amount;
  13.     private StringProperty unit;
  14.     private StringProperty ingred;
  15.    
  16.     public Ingredients() {
  17.         this.id = new SimpleIntegerProperty();
  18.         this.amount = new SimpleDoubleProperty();
  19.         this.unit = new SimpleStringProperty();
  20.         this.ingred = new SimpleStringProperty();
  21.     }
  22.  
  23.     public int getId() {
  24.         return id.get();
  25.     }
  26.    
  27.     public void setId(int id) {
  28.         this.id.set(id);
  29.     }
  30.    
  31.     public IntegerProperty getIdProperty() {
  32.         return id;
  33.     }
  34.    
  35.    
  36.     public double getAmount() {
  37.         return amount.get();
  38.     }
  39.    
  40.     public void setAmount(double amount) {
  41.         this.amount.set(amount);
  42.     }
  43.    
  44.     public DoubleProperty getAmountProperty() {
  45.         return amount;
  46.     }
  47.    
  48.    
  49.     public String getUnit() {
  50.         return unit.get();
  51.     }
  52.    
  53.     public void setUnit(String unit) {
  54.          this.unit.set(unit);
  55.     }
  56.    
  57.     public StringProperty getUnitProperty() {
  58.         return unit;
  59.     }
  60.    
  61.  
  62.     public String getIngred() {
  63.         return ingred.get();
  64.     }
  65.    
  66.     public void setIngred(String ingred) {
  67.         this.ingred.set(ingred);
  68.     }
  69.    
  70.     public StringProperty getIngredProperty() {
  71.         return ingred;
  72.     }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement