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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.state
.model
;
17 * <b><u>LttvTrapState</u></b>
21 public class LttngTrapState
implements Cloneable
{
22 // ========================================================================
24 // =======================================================================
28 // ========================================================================
30 // =======================================================================
32 public LttngTrapState() {
36 public LttngTrapState(Long running
) {
37 this.running
= running
;
41 public LttngTrapState
clone() {
42 LttngTrapState newState
= null;
45 newState
= (LttngTrapState
)super.clone();
48 // Basic type in java are immutable!
49 // Thus, using assignation ("=") on basic type is CORRECT,
50 // but we should ALWAYS use "new" or "clone()" on "non basic" type
51 newState
.running
= this.running
;
53 catch ( CloneNotSupportedException e
) {
54 System
.out
.println("Cloning failed with : " + e
.getMessage() );
60 // ========================================================================
62 // =======================================================================
63 public Long
getRunning() {
67 public void setRunning(Long running
) {
68 this.running
= running
;
71 public void incrementRunning() {
75 public void decrementRunning() {
81 public String
toString() {
82 return "running : " + running
;