-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: made Repository use generics instead of Object type
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,22 @@ | ||
| package edu.group5.app.model; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * Represents a repository | ||
| */ | ||
| public abstract class Repository { | ||
| protected final Object content; | ||
| public abstract class Repository<K, V> { | ||
| protected final Map<K, V> content; | ||
|
|
||
| public Repository(Object content) { | ||
| public Repository(Map<K, V> content) { | ||
| this.content = content; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the content of the repo | ||
| * @return content of the repo | ||
| */ | ||
| public Object getContent() { | ||
| public Map<K, V> getContent() { | ||
| return content; | ||
| } | ||
| } |