/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package propertiesswing2; /** * * @author denis */ public class UserCheck { public boolean check(String username, String password){ if(username==null || username.isEmpty() || password == null || password.isEmpty()) return false; for (User user : PersonStore.getPersonStore().getPersons()){ if(user.getUsername().equals(username) && user.getPassword().equals(password)) return true; } return false; } }