sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.wizards/src/com/nokia/carbide/cpp/internal/pi/wizards/ui/util/RofsObySymbolPair.java
changeset 2 b9ab3b238396
equal deleted inserted replaced
1:1050670c6980 2:b9ab3b238396
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *
       
    16  */
       
    17 
       
    18 package com.nokia.carbide.cpp.internal.pi.wizards.ui.util;
       
    19 
       
    20 public class RofsObySymbolPair {
       
    21 	private String obyFile = "";	//$NON-NLS-1$
       
    22 	private String symbolFile = "";	//$NON-NLS-1$
       
    23 	
       
    24 	public void setObyFile(String filename) {
       
    25 		if (filename == null) {
       
    26 			filename = "";	//$NON-NLS-1$
       
    27 		}
       
    28 		obyFile = filename;
       
    29 	}
       
    30 	
       
    31 	public String getObyFile() {
       
    32 		return obyFile;
       
    33 	}
       
    34 	
       
    35 	public boolean haveObyFile() {
       
    36 		return (obyFile.length() > 0);
       
    37 	}
       
    38 	
       
    39 	public void setSymbolFile(String filename) {
       
    40 		if (filename == null) {
       
    41 			filename = "";	//$NON-NLS-1$
       
    42 		}
       
    43 		symbolFile = filename;
       
    44 	}
       
    45 	
       
    46 	public String getSymbolFile() {
       
    47 		return symbolFile;
       
    48 	}
       
    49 	
       
    50 	public boolean haveSymbolFile() {
       
    51 		return (symbolFile.length() > 0);
       
    52 	}
       
    53 	
       
    54 	public String getDisplayString() {
       
    55 		String displayString = "";	//$NON-NLS-1$
       
    56 		if (obyFile.length() > 0) {
       
    57 			displayString += obyFile;
       
    58 		}
       
    59 		if (symbolFile.length() > 0) {
       
    60 			if (displayString.length() > 0) {
       
    61 				displayString += '\n';	//$NON-NLS-1$
       
    62 			}
       
    63 			displayString += symbolFile;
       
    64 		}
       
    65 		return displayString;
       
    66 	}
       
    67 
       
    68 	public boolean equals(RofsObySymbolPair pair) {
       
    69 		if (this.getObyFile().equals(pair.getObyFile()) == false) {
       
    70 			return false;
       
    71 		}
       
    72 		if (this.getSymbolFile().equals(pair.getSymbolFile()) == false) {
       
    73 			return false;
       
    74 		}
       
    75 		return true;
       
    76 	}
       
    77 }