1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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
.lttng2
.core
.control
.model
.impl
;
14 import org
.eclipse
.linuxtools
.internal
.lttng2
.core
.control
.model
.ITraceInfo
;
18 * Implementation of the base trace information interface (ITraceInfo) to
22 * @author Bernd Hufmann
24 public class TraceInfo
implements ITraceInfo
{
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
30 * The name of the element.
32 private String fName
= null;
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
39 * @param name - name of trace element
41 public TraceInfo(String name
) {
43 throw new IllegalArgumentException();
50 * @param other - the instance to copy
52 public TraceInfo(TraceInfo other
) {
54 throw new IllegalArgumentException();
56 fName
= String
.valueOf(other
.fName
);
59 // ------------------------------------------------------------------------
61 // ------------------------------------------------------------------------
64 public String
getName() {
69 public void setName(String name
) {
74 public int hashCode() {
77 result
= prime
* result
+ ((fName
== null) ?
0 : fName
.hashCode());
82 public boolean equals(Object obj
) {
89 if (getClass() != obj
.getClass()) {
92 TraceInfo other
= (TraceInfo
) obj
;
94 if (other
.fName
!= null) {
97 } else if (!fName
.equals(other
.fName
)) {
103 @SuppressWarnings("nls")
105 public String
toString() {
106 StringBuffer output
= new StringBuffer();
107 output
.append("[TraceInfo(");
108 output
.append("Name=");
109 output
.append(getName());
111 return output
.toString();
This page took 0.032383 seconds and 5 git commands to generate.