Skip to content

Commit

Permalink
refactor: made OrganizationRepository consistent with Repository
Browse files Browse the repository at this point in the history
  • Loading branch information
emilfa committed Mar 3, 2026
1 parent 23c7524 commit 662c4ce
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,15 @@
/**
* Handles the business logic associated with organizations
*/
public class OrganizationRepository extends Repository {
private final Map<Integer, Organization> content;

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

/**
* Returns the organizations within the repository.
* @return all organizations within the repository.
*/
@Override
public Map<Integer, Organization> getContent() {
return content;
super(Objects.requireNonNull(content, "content cannot be null"));
}

/**
Expand Down

0 comments on commit 662c4ce

Please sign in to comment.