Skip to content

Commit

Permalink
Update javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
w3stling committed Jan 19, 2024
1 parent 28d4a57 commit 80aa24c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
47 changes: 40 additions & 7 deletions src/main/java/com/apptasticsoftware/mic/Mic.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class Mic {
private final String acronym;
private final String countryCode;
private final String city;
private final String webSite;
private final String website;
private final String status;
private final String creationDate;
private final String lastUpdateDate;
Expand All @@ -57,9 +57,31 @@ public final class Mic {
private final String comments;


/**
* Constructor
* @param micCode MIC code
* @param operatingMic operating MIC
* @param marketType market type
* @param nameInstitutionDescription name institution description
* @param legalEntityName legal entity name
* @param leiCode LEI code
* @param marketCategoryCode market category code
* @param acronym acronym
* @param countryCode country code
* @param city city
* @param webSite website
* @param status status
* @param creationDate creation date
* @param lastUpdateDate last update date
* @param lastValidationDate last validation date
* @param expiryDate expiry date
* @param comments comments
*/
@java.lang.SuppressWarnings("squid:S00107")
public Mic(String micCode, String operatingMic, String marketType, String nameInstitutionDescription, String legalEntityName, String leiCode,
String marketCategoryCode, String acronym, String countryCode, String city, String webSite, String status, String creationDate, String lastUpdateDate, String lastValidationDate, String expiryDate, String comments) {
public Mic(String micCode, String operatingMic, String marketType, String nameInstitutionDescription,
String legalEntityName, String leiCode, String marketCategoryCode, String acronym, String countryCode,
String city, String webSite, String status, String creationDate, String lastUpdateDate,
String lastValidationDate, String expiryDate, String comments) {

this.micCode = micCode;
this.operatingMic = operatingMic;
Expand All @@ -71,7 +93,7 @@ public Mic(String micCode, String operatingMic, String marketType, String nameIn
this.acronym = noEmptyString(acronym);
this.countryCode = countryCode;
this.city = city;
this.webSite = noEmptyString(webSite);
this.website = noEmptyString(webSite);
this.status = status;
this.creationDate = creationDate;
this.lastUpdateDate = lastUpdateDate;
Expand Down Expand Up @@ -166,9 +188,20 @@ public String getCity() {
/**
* Website of the market.
* @return URL to website
* @deprecated
* Use {@link #getWebsite() getWebsite} method instead.
*/
@Deprecated(since = "3.0.14", forRemoval = true)
public Optional<String> getWebSite() {
return Optional.ofNullable(webSite);
return Optional.ofNullable(website);
}

/**
* Website of the market.
* @return URL to website
*/
public Optional<String> getWebsite() {
return Optional.ofNullable(website);
}

/**
Expand Down Expand Up @@ -296,7 +329,7 @@ public boolean equals(Object o) {
Objects.equals(getAcronym(), mic.getAcronym()) &&
Objects.equals(getCountryCode(), mic.getCountryCode()) &&
Objects.equals(getCity(), mic.getCity()) &&
Objects.equals(getWebSite(), mic.getWebSite()) &&
Objects.equals(getWebsite(), mic.getWebsite()) &&
Objects.equals(getStatus(), mic.getStatus()) &&
Objects.equals(getCreationDate(), mic.getCreationDate()) &&
Objects.equals(getLastUpdateDate(), mic.getLastUpdateDate()) &&
Expand All @@ -307,6 +340,6 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(getMic(), getOperatingMic(), getMarketType(), getNameInstitutionDescription(), getLegalEntityName(), getLeiCode(), getMarketCategoryCode(), getAcronym(), getCountryCode(), getCity(), getWebSite(), getStatus(), getCreationDate(), getLastUpdateDate(), getLastValidationDate(), getExpiryDate(), getComments());
return Objects.hash(getMic(), getOperatingMic(), getMarketType(), getNameInstitutionDescription(), getLegalEntityName(), getLeiCode(), getMarketCategoryCode(), getAcronym(), getCountryCode(), getCity(), getWebsite(), getStatus(), getCreationDate(), getLastUpdateDate(), getLastValidationDate(), getExpiryDate(), getComments());
}
}
4 changes: 2 additions & 2 deletions src/test/java/com/apptasticsoftware/mic/MicLookupTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void testDownloadGetByMic() throws IOException {
assertEquals("NASDAQ STOCKHOLM AB", mic.get().getNameInstitutionDescription());
assertFalse(mic.get().getAcronym().isPresent());
assertEquals("STOCKHOLM", mic.get().getCity());
assertEquals("WWW.NASDAQOMXNORDIC.COM", mic.get().getWebSite().orElse(null));
assertEquals("WWW.NASDAQOMXNORDIC.COM", mic.get().getWebsite().orElse(null));
assertEquals("ACTIVE", mic.get().getStatus());
assertTrue(mic.get().isActive());
assertFalse(mic.get().isExpired());
Expand Down Expand Up @@ -99,7 +99,7 @@ void testFromFileGetByMic() throws IOException {
assertEquals("NASDAQ STOCKHOLM AB", mic.get().getNameInstitutionDescription());
assertFalse(mic.get().getAcronym().isPresent());
assertEquals("STOCKHOLM", mic.get().getCity());
assertEquals("WWW.NASDAQOMXNORDIC.COM", mic.get().getWebSite().orElse(null));
assertEquals("WWW.NASDAQOMXNORDIC.COM", mic.get().getWebsite().orElse(null));
assertEquals("ACTIVE", mic.get().getStatus());
assertTrue(mic.get().isActive());
assertFalse(mic.get().isExpired());
Expand Down

0 comments on commit 80aa24c

Please sign in to comment.