1 /*******************************************************************************
2 * Copyright (c) 2009 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 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.event
;
16 * <b><u>TmfEventSource</u></b>
20 public class TmfEventSource
{
22 // ------------------------------------------------------------------------
24 // ------------------------------------------------------------------------
26 protected Object fSourceId
;
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
33 * The default constructor
35 public TmfEventSource() {
42 public TmfEventSource(Object sourceId
) {
50 public TmfEventSource(TmfEventSource other
) {
52 throw new IllegalArgumentException();
53 TmfEventSource o
= (TmfEventSource
) other
;
54 fSourceId
= o
.fSourceId
;
57 // ------------------------------------------------------------------------
59 // ------------------------------------------------------------------------
64 public Object
getSourceId() {
68 // ------------------------------------------------------------------------
70 // ------------------------------------------------------------------------
73 public int hashCode() {
74 return (fSourceId
!= null) ? fSourceId
.hashCode() : 0;
78 public boolean equals(Object other
) {
79 if (!(other
instanceof TmfEventSource
))
81 TmfEventSource o
= (TmfEventSource
) other
;
82 return fSourceId
.equals(o
.fSourceId
);
86 public String
toString() {
87 return "[TmfEventSource(" + ((fSourceId
!= null) ? fSourceId
.toString() : "null") + ")]";
This page took 0.041187 seconds and 5 git commands to generate.