File tree Expand file tree Collapse file tree 2 files changed +316
-6
lines changed
main/java/org/java_websocket/framing
test/java/org/java_websocket/drafts Expand file tree Collapse file tree 2 files changed +316
-6
lines changed Original file line number Diff line number Diff line change @@ -239,4 +239,32 @@ public static FramedataImpl1 get(Opcode opcode) {
239239 throw new IllegalArgumentException ("Supplied opcode is invalid" );
240240 }
241241 }
242+
243+ @ Override
244+ public boolean equals ( Object o ) {
245+ if ( this == o ) return true ;
246+ if ( o == null || getClass () != o .getClass () ) return false ;
247+
248+ FramedataImpl1 that = ( FramedataImpl1 ) o ;
249+
250+ if ( fin != that .fin ) return false ;
251+ if ( transferemasked != that .transferemasked ) return false ;
252+ if ( rsv1 != that .rsv1 ) return false ;
253+ if ( rsv2 != that .rsv2 ) return false ;
254+ if ( rsv3 != that .rsv3 ) return false ;
255+ if ( optcode != that .optcode ) return false ;
256+ return unmaskedpayload != null ? unmaskedpayload .equals ( that .unmaskedpayload ) : that .unmaskedpayload == null ;
257+ }
258+
259+ @ Override
260+ public int hashCode () {
261+ int result = ( fin ? 1 : 0 );
262+ result = 31 * result + optcode .hashCode ();
263+ result = 31 * result + ( unmaskedpayload != null ? unmaskedpayload .hashCode () : 0 );
264+ result = 31 * result + ( transferemasked ? 1 : 0 );
265+ result = 31 * result + ( rsv1 ? 1 : 0 );
266+ result = 31 * result + ( rsv2 ? 1 : 0 );
267+ result = 31 * result + ( rsv3 ? 1 : 0 );
268+ return result ;
269+ }
242270}
You can’t perform that action at this time.
0 commit comments