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
.IFieldInfo
;
18 * Implementation of the basic trace event interface (IEventInfo) to store event
22 * @author Bernd Hufmann
24 public class FieldInfo
extends TraceInfo
implements IFieldInfo
{
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
30 * The trace event type.
32 private String fFieldType
;
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
39 * @param name - name of base event
41 public FieldInfo(String name
) {
47 * @param other - the instance to copy
49 public FieldInfo(FieldInfo other
) {
51 fFieldType
= other
.fFieldType
;
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
60 * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo#getFieldType()
63 public String
getFieldType() {
69 * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.IFieldInfo#setFieldType(java.lang.String)
72 public void setFieldType(String fieldType
) {
73 fFieldType
= fieldType
;
78 * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#hashCode()
81 public int hashCode() {
83 int result
= super.hashCode();
84 result
= prime
* result
85 + ((fFieldType
== null) ?
0 : fFieldType
.hashCode());
91 * @see org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.TraceInfo#equals(java.lang.Object)
94 public boolean equals(Object obj
) {
98 if (!super.equals(obj
)) {
101 if (getClass() != obj
.getClass()) {
104 FieldInfo other
= (FieldInfo
) obj
;
105 if (fFieldType
== null) {
106 if (other
.fFieldType
!= null) {
109 } else if (!fFieldType
.equals(other
.fFieldType
)) {
117 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceInfo#toString()
119 @SuppressWarnings("nls")
121 public String
toString() {
122 StringBuffer output
= new StringBuffer();
123 output
.append("[FieldInfo(");
124 output
.append(super.toString());
125 output
.append(",type=");
126 output
.append(fFieldType
);
127 return output
.toString();
This page took 0.03221 seconds and 5 git commands to generate.