-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
556 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 28 additions & 4 deletions
32
owlsim-core/src/main/java/org/monarchinitiative/owlsim/model/kb/Attribute.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,50 @@ | ||
package org.monarchinitiative.owlsim.model.kb; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author cjm | ||
* | ||
*/ | ||
public class Attribute implements SimpleObject { | ||
|
||
private String id; | ||
private String label; | ||
private final String id; | ||
private final String label; | ||
|
||
public Attribute(String id, String label) { | ||
super(); | ||
this.id = id; | ||
this.label = label; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public String getLabel() { | ||
return label; | ||
} | ||
|
||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
Attribute attribute = (Attribute) o; | ||
return Objects.equals(id, attribute.id) && | ||
Objects.equals(label, attribute.label); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, label); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Attribute{" + | ||
"id='" + id + '\'' + | ||
", label='" + label + '\'' + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.