]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/GenBuild/org/tianocore/build/id/Identification.java
8315358b2f3e130e393f8a5ed58f288b467280a8
2 This file is to define Identification class.
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 package org
.tianocore
.build
.id
;
16 import org
.tianocore
.build
.global
.GlobalData
;
18 public class Identification
{
26 String type
; // Optional
28 Identification(String name
, String guid
, String version
){
31 this.version
= version
;
34 Identification(String guid
, String version
){
36 this.version
= version
;
39 public boolean equals(Object obj
) {
40 if (obj
instanceof Identification
) {
41 Identification id
= (Identification
)obj
;
42 if ( guid
.equalsIgnoreCase(id
.guid
)) {
43 if (version
== null || id
.version
== null) {
46 else if (version
.trim().equalsIgnoreCase("") || id
.version
.trim().equalsIgnoreCase("")){
49 else if (version
.equalsIgnoreCase(id
.version
)) {
56 return super.equals(obj
);
60 public void setName(String name
) {
64 public void setGuid(String guid
) {
68 public void setVersion(String version
) {
69 this.version
= version
;
72 public String
getGuid() {
76 public String
getName() {
80 public String
getVersion() {
84 public int hashCode(){
85 return guid
.toLowerCase().hashCode();