DataItem.java
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
3  * All rights reserved. This program is made available under the terms of the
4  * Eclipse Public License v1.0 which accompanies this distribution, and is
5  * available at http://www.eclipse.org/legal/epl-v10.html
6  * Contributors:
7  * General Robotix Inc.
8  * National Institute of Advanced Industrial Science and Technology (AIST)
9  */
10 package com.generalrobotix.ui.view.graph;
11 
18 public class DataItem {
19 
20  public final String object; // オブジェクト名
21  public final String node; // ノード名
22  public final String attribute; // アトリビュート名
23  public final int index; // 添字
24 
25  final String fullName_; // 完全名
26  final String attributePath_; // アトリビュートパス(添字なし)
27  final String fullAttributeName_;
28 
29  // -----------------------------------------------------------------
30  // コンストラクタ
39  public DataItem(
40  String object,
41  String node,
42  String attribute,
43  int index,
44  String nodeType
45  ) {
46  this.object = object;
47  this.node = node;
48  this.attribute = attribute;
49  this.index = index;
50 
51  StringBuffer sb;
52  if (object == null) { // オブジェクト名なし?
53  sb = new StringBuffer(); // オブジェクト名除外
54  } else { // オブジェクト名あり?
55  sb = new StringBuffer(object); // オブジェクト名付加
56  sb.append(".");
57  }
58  sb.append(node); // ノード
59  sb.append(".");
60  sb.append(attribute); // アトリビュート
61  attributePath_ = sb.toString();
62  if (index >= 0) { // 多次元?
63  sb.append(".");
64  sb.append(index); // 添字
65  }
66  fullName_ = sb.toString();
67  fullAttributeName_ = nodeType + "." + attribute;
68  }
69 
77  public String toString() {
78  return fullName_;
79  }
80 
88  public String getAttributePath() {
89  return attributePath_;
90  }
91 
92  public String getFullAttributeName(){
93  return fullAttributeName_;
94  }
95 
101  public boolean isArray() {
102  return (index >= 0);
103  }
104 }
#define null
our own NULL pointer
Definition: IceTypes.h:57
DataItem(String object, String node, String attribute, int index, String nodeType)
Definition: DataItem.java:39


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:02