]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/Identifications/Identification.java
3 The file is used to save basic information
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.frameworkwizard
.common
.Identifications
;
18 public class Identification
{
21 /// Define class members
27 private String version
;
31 public Identification(String name
, String guid
, String version
) {
34 this.version
= version
;
37 public Identification() {
41 public Identification(String name
, String guid
, String version
, String path
) {
44 this.version
= version
;
48 public boolean equals(Object obj
) {
49 if (obj
instanceof Identification
) {
50 Identification id
= (Identification
)obj
;
51 if (path
.equals(id
.path
)) {
52 //if ( name.equals(id.name) && guid.equals(id.guid) && version.equals(id.version)) {
58 return super.equals(obj
);
62 public boolean equalsWithGuid(Object obj
) {
63 if (obj
instanceof Identification
) {
64 Identification id
= (Identification
)obj
;
65 if ( guid
.equalsIgnoreCase(id
.guid
)) {
66 if (version
== null || id
.version
== null) {
69 else if (version
.trim().equalsIgnoreCase("") || id
.version
.trim().equalsIgnoreCase("")){
72 else if (version
.equalsIgnoreCase(id
.version
)) {
79 return super.equals(obj
);
83 public void setName(String name
) {
87 public void setGuid(String guid
) {
91 public void setVersion(String version
) {
92 this.version
= version
;
95 public void setPath(String path
) {
99 public String
getGuid() {
103 public String
getName() {
107 public String
getVersion() {
111 public String
getPath() {
115 public int hashCode(){
116 return guid
.toLowerCase().hashCode();