1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.impl
;
14 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.ITraceInfo
;
17 * <b><u>TraceInfo</u></b>
19 * Implementation of the base trace information interface (ITraceInfo) to
23 public class TraceInfo
implements ITraceInfo
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
29 * The name of the element.
31 private String fName
= null;
33 // ------------------------------------------------------------------------
35 // ------------------------------------------------------------------------
38 * @param name - name of trace element
40 public TraceInfo(String name
) {
42 throw new IllegalArgumentException();
49 * @param other - the instance to copy
51 public TraceInfo(TraceInfo other
) {
53 throw new IllegalArgumentException();
55 fName
= String
.valueOf(other
.fName
);
59 // ------------------------------------------------------------------------
61 // ------------------------------------------------------------------------
64 * @see org.eclipse.linuxtools.internal.lttng.ui.views.control.model.ITraceInfo#getName()
67 public String
getName() {
73 * @see org.eclipse.linuxtools.internal.lttng.ui.views.control.model.ITraceInfo#setName(java.lang.String)
76 public void setName(String name
) {
82 * @see org.eclipse.linuxtools.internal.lttng.ui.views.control.model.ITraceInfo#formatString()
85 public String
formatString() {
91 * @see java.lang.Object#hashCode()
94 public int hashCode() {
97 result
= prime
* result
+ ((fName
== null) ?
0 : fName
.hashCode());
103 * @see java.lang.Object#equals(java.lang.Object)
106 public boolean equals(Object obj
) {
113 if (getClass() != obj
.getClass()) {
116 TraceInfo other
= (TraceInfo
) obj
;
118 if (other
.fName
!= null) {
121 } else if (!fName
.equals(other
.fName
)) {
128 * @see java.lang.Object#toString()
130 @SuppressWarnings("nls")
132 public String
toString() {
133 StringBuffer output
= new StringBuffer();
134 output
.append("[TraceInfo(");
135 output
.append("Name=");
136 output
.append(getName());
138 return output
.toString();
This page took 0.037316 seconds and 6 git commands to generate.