Пример #1
0
 @Override
 public boolean deleteCard(Integer cardId) {
   if (turniketDB.getCards().containsKey(cardId)) {
     turniketDB.getCards().remove(cardId);
     turniketDB.getOperations().remove(cardId);
     return true;
   } else {
     return false;
   }
 }
Пример #2
0
 @Override
 public boolean addCard(Integer cardId, String employee) {
   if (turniketDB.getCards().containsKey(cardId)) {
     return false;
   } else {
     turniketDB.getCards().put(cardId, employee);
     // turniketDB.getOperations().put(cardId, null);
     return true;
   }
 }
Пример #3
0
 @Override
 public String employee(Integer cardId) {
   return turniketDB.getCards().get(cardId);
 }