[LIB-10] SerialVersionUID for Serializable classes
[snooker-score-api.git] / src / main / java / org / hedgecode / snooker / json / JsonOngoingMatches.java
1 /*
2  * Copyright (c) 2017-2020. Developed by Hedgecode.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.hedgecode.snooker.json;
18
19 import java.io.Serializable;
20
21 import org.hedgecode.snooker.api.OngoingMatch;
22 import org.hedgecode.snooker.api.OngoingMatches;
23
24 /**
25  * Ongoing Matches Entity (set of {@link OngoingMatches}) to JSON deserialize.
26  *
27  * @author Dmitry Samoshin aka gotty
28  */
29 public class JsonOngoingMatches
30         extends JsonCollectionEntity<OngoingMatch>
31         implements OngoingMatches, Serializable
32 {
33     private static final long serialVersionUID = 1026260972671849624L;
34
35     JsonOngoingMatches(OngoingMatch[] entities) {
36         super(entities);
37     }
38
39     @Override
40     public OngoingMatch byNumber(int number) {
41         for (OngoingMatch ongoingMatch : this)
42             if (ongoingMatch.number() == number)
43                 return ongoingMatch;
44         return null;
45     }
46
47 }