22
33import com .fasterxml .jackson .annotation .JsonCreator ;
44import com .fasterxml .jackson .annotation .JsonProperty ;
5- import com .google .common .base .MoreObjects ;
6- import com .google .common .base .Objects ;
75import pl .zankowski .iextrading4j .api .refdata .SymbolType ;
86
97import java .io .Serializable ;
8+ import java .util .Objects ;
9+ import java .util .StringJoiner ;
1010
1111public class SymbolDescription implements Serializable {
1212
1313 private static final long serialVersionUID = -7928382775445887294L ;
1414
1515 private final String symbol ;
16+ private final String exchange ;
17+ private final String exchangeSuffix ;
18+ private final String exchangeName ;
19+ private final String name ;
20+ private final String type ;
21+ private final String iexId ;
22+ private final String region ;
23+ private final String currency ;
24+ private final String figi ;
1625 private final String cik ;
26+ private final String lei ;
1727 private final String securityName ;
1828 private final SymbolType securityType ;
19- private final String region ;
20- private final String exchange ;
2129 private final String sector ;
22- private final String currency ;
30+
2331
2432 @ JsonCreator
2533 public SymbolDescription (
2634 @ JsonProperty ("symbol" ) final String symbol ,
35+ @ JsonProperty ("exchange" ) final String exchange ,
36+ @ JsonProperty ("exchangeSuffix" ) final String exchangeSuffix ,
37+ @ JsonProperty ("exchangeName" ) final String exchangeName ,
38+ @ JsonProperty ("name" ) final String name ,
39+ @ JsonProperty ("type" ) final String type ,
40+ @ JsonProperty ("iexId" ) final String iexId ,
41+ @ JsonProperty ("region" ) final String region ,
42+ @ JsonProperty ("currency" ) final String currency ,
43+ @ JsonProperty ("figi" ) final String figi ,
2744 @ JsonProperty ("cik" ) final String cik ,
45+ @ JsonProperty ("lei" ) final String lei ,
2846 @ JsonProperty ("securityName" ) final String securityName ,
2947 @ JsonProperty ("securityType" ) final SymbolType securityType ,
30- @ JsonProperty ("region" ) final String region ,
31- @ JsonProperty ("exchange" ) final String exchange ,
32- @ JsonProperty ("sector" ) final String sector ,
33- @ JsonProperty ("currency" ) final String currency ) {
48+ @ JsonProperty ("sector" ) final String sector ) {
3449 this .symbol = symbol ;
50+ this .exchange = exchange ;
51+ this .exchangeSuffix = exchangeSuffix ;
52+ this .exchangeName = exchangeName ;
53+ this .name = name ;
54+ this .type = type ;
55+ this .iexId = iexId ;
56+ this .figi = figi ;
3557 this .cik = cik ;
58+ this .lei = lei ;
3659 this .securityName = securityName ;
3760 this .securityType = securityType ;
3861 this .region = region ;
39- this .exchange = exchange ;
4062 this .sector = sector ;
4163 this .currency = currency ;
4264 }
@@ -45,34 +67,62 @@ public String getSymbol() {
4567 return symbol ;
4668 }
4769
48- public String getCik () {
49- return cik ;
70+ public String getExchange () {
71+ return exchange ;
5072 }
5173
52- public String getSecurityName () {
53- return securityName ;
74+ public String getExchangeSuffix () {
75+ return exchangeSuffix ;
5476 }
5577
56- public SymbolType getSecurityType () {
57- return securityType ;
78+ public String getExchangeName () {
79+ return exchangeName ;
5880 }
5981
60- public String getRegion () {
61- return region ;
82+ public String getName () {
83+ return name ;
6284 }
6385
64- public String getExchange () {
65- return exchange ;
86+ public String getType () {
87+ return type ;
6688 }
6789
68- public String getSector () {
69- return sector ;
90+ public String getIexId () {
91+ return iexId ;
92+ }
93+
94+ public String getRegion () {
95+ return region ;
7096 }
7197
7298 public String getCurrency () {
7399 return currency ;
74100 }
75101
102+ public String getFigi () {
103+ return figi ;
104+ }
105+
106+ public String getCik () {
107+ return cik ;
108+ }
109+
110+ public String getLei () {
111+ return lei ;
112+ }
113+
114+ public String getSecurityName () {
115+ return securityName ;
116+ }
117+
118+ public SymbolType getSecurityType () {
119+ return securityType ;
120+ }
121+
122+ public String getSector () {
123+ return sector ;
124+ }
125+
76126 @ Override
77127 public boolean equals (final Object o ) {
78128 if (this == o ) {
@@ -82,33 +132,40 @@ public boolean equals(final Object o) {
82132 return false ;
83133 }
84134 final SymbolDescription that = (SymbolDescription ) o ;
85- return Objects .equal (symbol , that .symbol ) &&
86- Objects .equal ( cik , that .cik ) &&
87- Objects .equal ( securityName , that .securityName ) &&
88- securityType == that .securityType &&
89- Objects .equal (region , that .region ) &&
90- Objects .equal ( sector , that .sector ) &&
91- Objects .equal ( exchange , that .exchange ) &&
92- Objects .equal ( currency , that .currency );
135+ return Objects .equals (symbol , that .symbol ) && Objects . equals ( exchange , that . exchange ) &&
136+ Objects .equals ( exchangeSuffix , that .exchangeSuffix ) &&
137+ Objects .equals ( exchangeName , that .exchangeName ) && Objects . equals ( name , that . name ) &&
138+ Objects . equals ( type , that . type ) && Objects . equals ( iexId , that .iexId ) &&
139+ Objects .equals (region , that .region ) && Objects . equals ( currency , that . currency ) &&
140+ Objects .equals ( figi , that .figi ) && Objects . equals ( cik , that . cik ) &&
141+ Objects .equals ( lei , that .lei ) && Objects . equals ( securityName , that . securityName ) &&
142+ securityType == that . securityType && Objects .equals ( sector , that .sector );
93143 }
94144
95145 @ Override
96146 public int hashCode () {
97- return Objects .hashCode (symbol , cik , securityName , securityType , region , exchange , sector , currency );
147+ return Objects .hash (symbol , exchange , exchangeSuffix , exchangeName , name , type , iexId ,
148+ region , currency , figi , cik , lei , securityName , securityType , sector );
98149 }
99150
100151 @ Override
101152 public String toString () {
102- return MoreObjects .toStringHelper (this )
103- .add ("symbol" , symbol )
104- .add ("cik" , cik )
105- .add ("securityName" , securityName )
106- .add ("securityType" , securityType )
107- .add ("region" , region )
108- .add ("exchange" , exchange )
109- .add ("sector" , sector )
110- .add ("currency" , currency )
153+ return new StringJoiner (", " , SymbolDescription .class .getSimpleName () + "[" , "]" )
154+ .add ("symbol='" + symbol + "'" )
155+ .add ("exchange='" + exchange + "'" )
156+ .add ("exchangeSuffix='" + exchangeSuffix + "'" )
157+ .add ("exchangeName='" + exchangeName + "'" )
158+ .add ("name='" + name + "'" )
159+ .add ("type='" + type + "'" )
160+ .add ("iexId='" + iexId + "'" )
161+ .add ("region='" + region + "'" )
162+ .add ("currency='" + currency + "'" )
163+ .add ("figi='" + figi + "'" )
164+ .add ("cik='" + cik + "'" )
165+ .add ("lei='" + lei + "'" )
166+ .add ("securityName='" + securityName + "'" )
167+ .add ("securityType=" + securityType )
168+ .add ("sector='" + sector + "'" )
111169 .toString ();
112170 }
113-
114171}
0 commit comments