|
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.model; |
|
19 |
|
20 import java.io.Serializable; |
|
21 |
|
22 /* |
|
23 * |
|
24 * PRI HOMMAT KOMMENTOITU TÄSTÄ FILESTÄ TOISTAISEKSI |
|
25 * |
|
26 */ |
|
27 |
|
28 public class ProfiledThread extends ProfiledGeneric implements Serializable |
|
29 { |
|
30 private static final long serialVersionUID = 20150633093396772L; |
|
31 |
|
32 private char name; //char symbol of the thread |
|
33 |
|
34 private int threadId; //thread's real id |
|
35 |
|
36 public ProfiledThread() |
|
37 { |
|
38 super(); |
|
39 } |
|
40 |
|
41 public void setNameValues(char symbol,String nameString) |
|
42 { |
|
43 this.name = symbol; |
|
44 setNameString(nameString); |
|
45 } |
|
46 |
|
47 public String toString(int graphIndex) |
|
48 { |
|
49 if (this.isEnabled(graphIndex)) |
|
50 { |
|
51 return "true " + this.getAverageLoadValueString(graphIndex) + getNameString(); //$NON-NLS-1$ |
|
52 } |
|
53 else |
|
54 { |
|
55 return "false " + this.getAverageLoadValueString(graphIndex) + getNameString(); //$NON-NLS-1$ |
|
56 } |
|
57 } |
|
58 |
|
59 public Character getName(){ |
|
60 return new Character(this.name); |
|
61 } |
|
62 |
|
63 public int getThreadId() |
|
64 { |
|
65 return threadId; |
|
66 } |
|
67 |
|
68 public void setThreadId(int threadId) |
|
69 { |
|
70 this.threadId = threadId; |
|
71 } |
|
72 } |