~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIList.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2000, 2006 QNX Software Systems and others.
 
3
 * All rights reserved. This program and the accompanying materials
 
4
 * are made available under the terms of the Eclipse Public License v1.0
 
5
 * which accompanies this distribution, and is available at
 
6
 * http://www.eclipse.org/legal/epl-v10.html
 
7
 *
 
8
 * Contributors:
 
9
 *     QNX Software Systems - Initial API and implementation
 
10
 *******************************************************************************/
 
11
package org.eclipse.cdt.debug.mi.core.output;
 
12
 
 
13
/**
 
14
 * GDB/MI list semantic.
 
15
 */
 
16
public class MIList extends MIValue {
 
17
 
 
18
        final static MIResult[] nullResults = new MIResult[0];
 
19
        final static MIValue[] nullValues = new MIValue[0];
 
20
 
 
21
        MIResult[] results = nullResults;
 
22
        MIValue[] values = nullValues;
 
23
 
 
24
        public MIResult[] getMIResults() {
 
25
                return results;
 
26
        }
 
27
 
 
28
        public void setMIResults(MIResult[] res) {
 
29
                results = res;
 
30
        }
 
31
 
 
32
        public MIValue[] getMIValues() {
 
33
                return values;
 
34
        }
 
35
 
 
36
        public void setMIValues(MIValue[] vals) {
 
37
                values = vals;
 
38
        }
 
39
 
 
40
        public String toString() {
 
41
                StringBuffer buffer = new StringBuffer();
 
42
                buffer.append('[');
 
43
                for (int i = 0; i < results.length; i++) {
 
44
                        if (i != 0) {
 
45
                                buffer.append(',');
 
46
                        }
 
47
                        buffer.append(results[i].toString());
 
48
                }
 
49
                for (int i = 0; i < values.length; i++) {
 
50
                        if (i != 0) {
 
51
                                buffer.append(',');
 
52
                        }
 
53
                        buffer.append(values[i].toString());
 
54
                }
 
55
                buffer.append(']');
 
56
                return buffer.toString();
 
57
        }
 
58
}