public class IlvURLKeyTable extends Object implements IlvPersistentObject
IlvMultipleIcon
.
The same URL table can be shared among different IlvMultipleIcon
instances.Constructor and Description |
---|
IlvURLKeyTable()
Creates a new empty table.
|
IlvURLKeyTable(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
IlvURLKeyTable(IlvURLKeyTable source)
Creates a copy of the source table.
|
Modifier and Type | Method and Description |
---|---|
void |
add(String key,
URL url)
Adds a URL associated with the key at the end of the table.
|
int |
getIndex(String key)
Returns the index of the input key.
|
String[] |
getKey()
Returns the keys.
|
String |
getKey(int index)
Returns the key for a given index.
|
int |
getLastIndex(String key)
Returns the last index of the input key.
|
URL[] |
getURL()
Returns the URLs.
|
URL |
getURL(int index)
Returns the URL for a given index.
|
URL |
getURL(String key)
Returns the URL for a given key.
|
void |
remove(int index)
Removes the entry at the given index.
|
void |
remove(String key)
Removes the entry for a given key.
|
void |
set(int index,
String key,
URL url)
Sets the URL associated with the key at a given index of the table.
|
void |
setKey(int index,
String key)
Sets the key for a given index.
|
void |
setKey(String[] keys)
Sets the keys.
|
void |
setURL(int index,
URL url)
Sets the URL for a given index.
|
void |
setURL(URL[] urls)
Sets the URLs.
|
int |
size()
Returns the length of the table.
|
void |
trim()
Trims the table.
|
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
public IlvURLKeyTable()
public IlvURLKeyTable(IlvURLKeyTable source)
public IlvURLKeyTable(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public int size()
public void add(String key, URL url)
public void set(int index, String key, URL url)
public void trim()
public void remove(int index)
trim()
public void remove(String key)
public int getIndex(String key)
public int getLastIndex(String key)
public void setURL(int index, URL url)
index
- The index.url
- The URL.public URL getURL(int index)
index
- The index.public void setURL(URL[] urls)
urls
- The URLs.public URL[] getURL()
public void setKey(int index, String key)
index
- The index.key
- The key.public String getKey(int index)
index
- The index.public void setKey(String[] keys)
keys
- The keys.public String[] getKey()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.