LinkedHashMap
instead@Deprecated public class JNamedMap extends Object
A simple String to Object mapping which preserves order.
Note: This class is not synchronized. So be careful. :-)Constructor and Description |
---|
JNamedMap()
Deprecated.
Creates a new JNamedMap
|
JNamedMap(int size)
Deprecated.
Creates a new JNamedMap with the given size.
|
Modifier and Type | Method and Description |
---|---|
Object |
get(int index)
Deprecated.
Returns the Object at the given index.
|
Object |
get(String name)
Deprecated.
Returns the Object associated with the given name.
|
String |
getNameByObject(Object obj)
Deprecated.
Returns the name associated with the given Object
|
Vector<String> |
getNames()
Deprecated.
Return a Vector of names
|
Vector<Object> |
getObjects()
Deprecated.
Return a Vector of Objects
|
int |
indexOf(String name)
Deprecated.
Returns the index of the Object which has been
mapped (associated) with the given name
|
void |
put(String name,
Object obj)
Deprecated.
Maps (associates) an Object with a name
|
Object |
remove(int index)
Deprecated.
Removes and returns the Object located at the given index
|
Object |
remove(String name)
Deprecated.
Removes and returns the Object associated with the given name
|
int |
size()
Deprecated.
Returns the number of Object associations currently in
this named map
|
public JNamedMap()
public JNamedMap(int size)
size
- the initial size for this NamedMappublic Object get(String name)
name
- the name to search forpublic Object get(int index) throws IndexOutOfBoundsException
index
- the index of the Object to returnIndexOutOfBoundsException
public String getNameByObject(Object obj)
obj
- the Object to search forpublic Vector<String> getNames()
public Vector<Object> getObjects()
public int indexOf(String name)
name
- the namepublic void put(String name, Object obj)
name
- the name to associate with the given Objectobj
- the Object to be mappedpublic Object remove(int index) throws IndexOutOfBoundsException
index
- the index of the Object to removeIndexOutOfBoundsException
public Object remove(String name)
name
- the name of the Object to removepublic int size()
Copyright © 2001–2022 Codehaus Plexus. All rights reserved.