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 // =======================================================================
31 public LttngTrapState(Long running
) {
32 this.running
= running
;
36 public LttngTrapState
clone() {
37 LttngTrapState newState
= null;
40 newState
= (LttngTrapState
)super.clone();
43 // Basic type in java are immutable!
44 // Thus, using assignation ("=") on basic type is CORRECT,
45 // but we should ALWAYS use "new" or "clone()" on "non basic" type
46 newState
.running
= this.running
;
48 catch ( CloneNotSupportedException e
) {
49 System
.out
.println("Cloning failed with : " + e
.getMessage() );
55 // ========================================================================
57 // =======================================================================
58 public Long
getRunning() {
62 public void setRunning(Long running
) {
63 this.running
= running
;
66 public void incrementRunning() {
70 public void decrementRunning() {