GrxUIonEclipse-project-0.9.8
src
com
generalrobotix
ui
util
OrderedHashMap.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.util;
11
import
java.util.*;
12
13
@SuppressWarnings({
"unchecked"
,
"serial"
})
14
public
class
OrderedHashMap
extends HashMap {
15
private
List<Object>
keyList_
;
16
private
List<Object>
valList_
;
17
18
public
OrderedHashMap
() {
19
keyList_ =
new
ArrayList<Object>();
20
valList_ =
new
ArrayList<Object>();
21
}
22
23
public
Object
put
(Object key,Object
obj
) {
24
if
(!containsKey(key)) {
25
keyList_.add(key);
26
valList_.add(obj);
27
}
28
return
super.put(key, obj);
29
}
30
31
public
Iterator
keys
() {
32
return
keyList_.iterator();
33
}
34
35
public
Collection
values
() {
36
return
valList_;
37
}
38
39
public
Object[]
toArray
() {
40
return
keyList_.toArray();
41
}
42
43
public
Object[]
toArray
(Object[] array) {
44
return
keyList_.toArray(array);
45
}
46
47
public
Object
remove
(Object key) {
48
keyList_.remove(key);
49
Object
val
= super.remove(key);
50
valList_.remove(val);
51
return
val
;
52
}
53
54
public
void
clear
(){
55
keyList_.clear();
56
valList_.clear();
57
super.clear();
58
}
59
}
com.generalrobotix.ui.util.OrderedHashMap.OrderedHashMap
OrderedHashMap()
Definition:
OrderedHashMap.java:18
com.generalrobotix.ui.util.OrderedHashMap.toArray
Object [] toArray(Object[] array)
Definition:
OrderedHashMap.java:43
val
int val
Definition:
jpeglib.h:956
com.generalrobotix.ui.util.OrderedHashMap.keys
Iterator keys()
Definition:
OrderedHashMap.java:31
com.generalrobotix.ui.util.OrderedHashMap
Definition:
OrderedHashMap.java:14
com.generalrobotix.ui.util.OrderedHashMap.put
Object put(Object key, Object obj)
Definition:
OrderedHashMap.java:23
com.generalrobotix.ui.util.OrderedHashMap.values
Collection values()
Definition:
OrderedHashMap.java:35
com.generalrobotix.ui.util.OrderedHashMap.keyList_
List< Object > keyList_
Definition:
OrderedHashMap.java:15
com.generalrobotix.ui.util.OrderedHashMap.clear
void clear()
Definition:
OrderedHashMap.java:54
com.generalrobotix.ui.util.OrderedHashMap.toArray
Object [] toArray()
Definition:
OrderedHashMap.java:39
viewSimTest.obj
obj
Definition:
viewSimTest.py:6
com.generalrobotix.ui.util.OrderedHashMap.valList_
List< Object > valList_
Definition:
OrderedHashMap.java:16
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:04