]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/GenBuild/org/tianocore/build/id/Identification.java
1 package org
.tianocore
.build
.id
;
3 import org
.tianocore
.build
.global
.GlobalData
;
5 public class Identification
{
13 String type
; // Optional
15 Identification(String name
, String guid
, String version
){
18 this.version
= version
;
21 Identification(String guid
, String version
){
23 this.version
= version
;
26 public boolean equals(Object obj
) {
27 if (obj
instanceof Identification
) {
28 Identification id
= (Identification
)obj
;
29 if ( guid
.equalsIgnoreCase(id
.guid
)) {
30 if (version
== null || id
.version
== null) {
33 else if (version
.trim().equalsIgnoreCase("") || id
.version
.trim().equalsIgnoreCase("")){
36 else if (version
.equalsIgnoreCase(id
.version
)) {
43 return super.equals(obj
);
47 public void setName(String name
) {
51 public void setGuid(String guid
) {
55 public void setVersion(String version
) {
56 this.version
= version
;
59 public String
getGuid() {
63 public String
getName() {
67 public String
getVersion() {
71 public int hashCode(){
72 return guid
.toLowerCase().hashCode();