/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package inport; /** * * @author topazh_ag */ public class Berth { private int id; private String name; private boolean isRaid; /** * Get the value of name * * @return the value of name */ public String getName() { return name; } /** * Set the value of name * * @param name new value of name */ public void setName(String name) { this.name = name; } /** * Get the value of id * * @return the value of id */ public int getId() { return id; } /** * Set the value of id * * @param id new value of id */ public void setId(int id) { this.id = id; } public boolean getIsRaid() { return isRaid; } public void setIsRaid(boolean isRaid) { this.isRaid = isRaid; } public Berth(int id, String name, boolean isRaid) { this.id = id; this.name = name; this.isRaid = isRaid; } public Berth() { } @Override public String toString() { return id + ";" + name; } public Berth(String s) { String[] tokens = s.split(";"); id = Integer.parseInt(tokens[0].trim()); name = tokens[1].trim(); } }