imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/iqrf/util/IQRFUtil.java
equal
deleted
inserted
replaced
|
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 "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.s60tools.imaker.internal.iqrf.util; |
|
19 |
|
20 public class IQRFUtil { |
|
21 public static boolean equals(String string1, String string2) { |
|
22 boolean ret = false; |
|
23 if((string1==null)&&(string2==null)) { |
|
24 ret=true; |
|
25 } else if((string1==null)||(string2==null)) { |
|
26 ret=false; |
|
27 } else { |
|
28 ret = string1.equals(string2); |
|
29 } |
|
30 return ret; |
|
31 } |
|
32 public static void main(String[] args) { |
|
33 if(equals(null,null)) { |
|
34 System.out.println("null==null"); |
|
35 } |
|
36 if(equals(null,"")) { |
|
37 System.out.println("null=="); |
|
38 } else { |
|
39 System.out.println("null!="); |
|
40 } |
|
41 if(equals("","")) { |
|
42 System.out.println("\"\"==\"\""); |
|
43 }else { |
|
44 System.out.println("\"\"==\"\""); |
|
45 } |
|
46 } |
|
47 } |