forked from nus-cs2103-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ui-and-default-data-updates
- Loading branch information
Showing
14 changed files
with
355 additions
and
48 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
14 changes: 0 additions & 14 deletions
14
src/main/java/seedu/address/logic/commands/AddOrganizationCommand.java
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package seedu.address.storage; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
import seedu.address.commons.exceptions.IllegalValueException; | ||
import seedu.address.model.person.Id; | ||
|
||
/** | ||
* Jackson-friendly version of {@link Id}. | ||
*/ | ||
class JsonAdaptedId { | ||
|
||
private final String idName; | ||
|
||
/** | ||
* Constructs a {@code JsonAdaptedId} with the given {@code idName}. | ||
*/ | ||
@JsonCreator | ||
public JsonAdaptedId(String idName) { | ||
this.idName = idName; | ||
} | ||
|
||
/** | ||
* Converts a given {@code Id} into this class for Jackson use. | ||
*/ | ||
public JsonAdaptedId(Id source) { | ||
idName = source.value; | ||
} | ||
|
||
@JsonValue | ||
public String getIdName() { | ||
return idName; | ||
} | ||
|
||
/** | ||
* Converts this Jackson-friendly adapted tag object into the model's {@code Id} object. | ||
* | ||
* @throws IllegalValueException if there were any data constraints violated in the adapted tag. | ||
*/ | ||
public Id toModelType() throws IllegalValueException { | ||
if (!Id.isValidId(idName)) { | ||
throw new IllegalValueException(Id.MESSAGE_CONSTRAINTS); | ||
} | ||
return new Id(idName); | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.