tracefw/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/project/GroupNameIdPair.java
changeset 56 aa2539c91954
parent 54 a151135b0cf9
child 60 e54443a6878c
child 62 1c2bb2fc7c87
equal deleted inserted replaced
54:a151135b0cf9 56:aa2539c91954
     1 /*
       
     2  * Copyright (c) 2010 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  * Class that include group name and id pair
       
    17  *
       
    18  */
       
    19 package com.nokia.tracecompiler.project;
       
    20 
       
    21 public class GroupNameIdPair {
       
    22 
       
    23 	// class associates a group name with an integer id
       
    24 	String name;
       
    25 	int id;
       
    26 
       
    27 	/**
       
    28 	 * Conctructor
       
    29 	 * 
       
    30 	 * @param name
       
    31 	 *            name of the group
       
    32 	 * @param id
       
    33 	 *            id of the group
       
    34 	 */
       
    35 	public GroupNameIdPair(String name, int id) {
       
    36 		if (name == null) {
       
    37 			this.name = ""; //$NON-NLS-1$
       
    38 			this.id = -1; // TODO - what is appropriate value here ?
       
    39 		} else {
       
    40 			this.name = name;
       
    41 			this.id = id;
       
    42 		}
       
    43 	}
       
    44 
       
    45 	/**
       
    46 	 * Get ID
       
    47 	 * 
       
    48 	 * @return id of the group
       
    49 	 */
       
    50 	public int Id() {
       
    51 		return this.id;
       
    52 	}
       
    53 
       
    54 	/**
       
    55 	 * Get name
       
    56 	 * 
       
    57 	 * @return name of the group
       
    58 	 */
       
    59 	public String Name() {
       
    60 		return this.name;
       
    61 	}
       
    62 }