Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Triple.java 2.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  1. /*
  2. * Copyright 2013,2014 BioASQ project: FP7/2007-2013, ICT-2011.4.4(d),
  3. * Intelligent Information Management,
  4. * Targeted Competition Framework grant agreement n° 318652.
  5. * www: http://www.bioasq.org
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. /**
  20. *
  21. * @author Ioannis Partalas
  22. */
  23. package data;
  24. public class Triple {
  25. String predicate;
  26. String subject;
  27. String operator;
  28. public Triple(String predicate, String subject, String operator) {
  29. this.predicate = predicate;
  30. this.subject = subject;
  31. this.operator = operator;
  32. }
  33. public String getOperator() {
  34. return operator;
  35. }
  36. public void setOperator(String operator) {
  37. this.operator = operator;
  38. }
  39. public String getPredicate() {
  40. return predicate;
  41. }
  42. public void setPredicate(String predicate) {
  43. this.predicate = predicate;
  44. }
  45. public String getSubject() {
  46. return subject;
  47. }
  48. public void setSubject(String subject) {
  49. this.subject = subject;
  50. }
  51. @Override
  52. public int hashCode() {
  53. int hash = 7;
  54. hash = 47 * hash + (this.predicate != null ? this.predicate.hashCode() : 0);
  55. hash = 47 * hash + (this.subject != null ? this.subject.hashCode() : 0);
  56. hash = 47 * hash + (this.operator != null ? this.operator.hashCode() : 0);
  57. return hash;
  58. }
  59. @Override public boolean equals(Object e)
  60. {
  61. if ( this == e ) return true;
  62. if ( !(e instanceof Triple) ) return false;
  63. Triple tr = (Triple)e;
  64. return this.predicate.equals(tr.predicate) && this.operator.equals(tr.operator) &&
  65. this.subject.equals(tr.subject);
  66. }
  67. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...