+++ /dev/null
-/** @file\r
- \r
- The file is used to save basic information\r
- \r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
- \r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
- \r
- **/\r
-\r
-package org.tianocore.frameworkwizard.common.Identifications;\r
-\r
-public class Identification {\r
-\r
- ///\r
- /// Define class members\r
- ///\r
- private String name;\r
-\r
- private String guid;\r
-\r
- private String version;\r
-\r
- private String path;\r
-\r
- public Identification(String name, String guid, String version) {\r
- this.name = name;\r
- this.guid = guid;\r
- this.version = version;\r
- }\r
-\r
- public Identification() {\r
-\r
- }\r
-\r
- public Identification(String name, String guid, String version, String path) {\r
- this.name = name;\r
- this.guid = guid;\r
- this.version = version;\r
- this.path = path;\r
- }\r
-\r
- public boolean equals(Object obj) {\r
- if (obj instanceof Identification) {\r
- Identification id = (Identification) obj;\r
- if (path.equals(id.path)) {\r
- return true;\r
- }\r
- return false;\r
- } else {\r
- return super.equals(obj);\r
- }\r
- }\r
-\r
- public boolean equalsWithGuid(Object obj) {\r
- if (obj instanceof Identification) {\r
- Identification id = (Identification) obj;\r
- if (guid.equalsIgnoreCase(id.guid)) {\r
- if (version == null || id.version == null) {\r
- return true;\r
- } else if (version.trim().equalsIgnoreCase("") || id.version.trim().equalsIgnoreCase("")) {\r
- return true;\r
- } else if (version.equalsIgnoreCase(id.version)) {\r
- return true;\r
- }\r
- }\r
- return false;\r
- } else {\r
- return super.equals(obj);\r
- }\r
- }\r
-\r
- public void setName(String name) {\r
- this.name = name;\r
- }\r
-\r
- public void setGuid(String guid) {\r
- this.guid = guid;\r
- }\r
-\r
- public void setVersion(String version) {\r
- this.version = version;\r
- }\r
-\r
- public void setPath(String path) {\r
- this.path = path;\r
- }\r
-\r
- public String getGuid() {\r
- return guid;\r
- }\r
-\r
- public String getName() {\r
- return name;\r
- }\r
-\r
- public String getVersion() {\r
- return version;\r
- }\r
-\r
- public String getPath() {\r
- return path;\r
- }\r
-\r
- public int hashCode() {\r
- return guid.toLowerCase().hashCode();\r
- }\r
-}\r