Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements the Login interface. Defines a file-based set of accounts.
- */
- package login.impl;
- import login.*;
- public class Utility
- {
- /**
- * Returns a given account's access credentials if the given access parameters match one of the given account array entries.
- * @param login The username associated to the account.
- * @param password The password associated to the account.
- * @param v The account credentials array.
- * @return The given account's access credentials, if present.
- */
- public static Login login(String login, String password, Login[] v)
- {
- for(int i = 0; i < v.length; i++)
- if(v[i].login(login, password) != null) return v[i];
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement