Skip to content

Commit

Permalink
feat: minor changes to OrganizationRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
emilfa committed Feb 26, 2026
1 parent aefd5ff commit dc7bc8f
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@
/**
* Handles business logic associated with organizations
*/
public class OrganizationRepo implements Repository {
private HashMap<Integer, Organization> content;
public class OrganizationRepo extends Repository {
private final HashMap<Integer, Organization> content;

/**
* Creates a new Organization Repository
*
* @param content holds all current organizations
* @param content holds all current organizations in the repository
* @throws NullPointerException if content is null
*/
public OrganizationRepo(HashMap<Integer, Organization> content) {
this.content = Objects.requireNonNull(content, "content cannot be null");
super(content);
}

public HashMap<Integer, Organization> getContent() {
return content;
}

/**
* Gets all trusted organizations in the repository
* @return all organizations with trusted = true
*/
public HashMap<Integer, Organization> getTrustedOrganizations() {
HashMap<Integer, Organization> trustedOrgs = new HashMap<>();

Expand Down

0 comments on commit dc7bc8f

Please sign in to comment.