コード例 #1
0
ファイル: Staff.java プロジェクト: supermarkion/LeetCode
 public void fillPosition(String title, Person hire) {
   for (Position position : this)
     if (position.getTitle().equals(title) && position.getPerson() == Person.NULL) {
       position.setPerson(hire);
       return;
     }
   throw new RuntimeException("Position " + title + " not available");
 }