public class NonGenericDictionary extends Object implements com.aspose.ms.System.Collections.Generic.IGenericDictionary
Represents a non generic dictionary.
Constructor and Description |
---|
NonGenericDictionary(com.aspose.ms.System.Collections.Generic.IGenericDictionary dictionary)
Initializes a new instance of the
NonGenericDictionary class. |
Modifier and Type | Method and Description |
---|---|
void |
addItem(Object o) |
void |
addItem(Object key,
Object value)
Adds an element with the provided key and value to the
T:System.Collections.IDictionary object. |
void |
clear()
Removes all elements from the
T:System.Collections.IDictionary object. |
boolean |
containsItem(Object key)
Determines whether the
T:System.Collections.IDictionary object contains an element with the specified key. |
boolean |
containsKey(Object o) |
void |
copyToTArray(Object[] array,
int index)
Copies the elements of the
T:System.Collections.ICollection to an
T:System.Array , starting at a particular
T:System.Array index. |
Object |
get_Item(Object key)
Gets or sets the element with the specified key.
|
com.aspose.ms.System.Collections.Generic.IGenericCollection |
getKeys()
Gets an
T:System.Collections.ICollection object containing the keys of the
T:System.Collections.IDictionary object. |
com.aspose.ms.System.Collections.Generic.IGenericCollection |
getValues()
Gets an
T:System.Collections.ICollection object containing the values in the
T:System.Collections.IDictionary object. |
boolean |
isReadOnly()
Gets a value indicating whether the
T:System.Collections.IDictionary object is read-only. |
com.aspose.ms.System.Collections.IEnumerator |
iterator_IEnumerator()
Returns an enumerator that iterates through a collection.
|
com.aspose.ms.System.Collections.Generic.IGenericEnumerator<Object> |
iterator()
Gets the enumerator.
|
boolean |
removeItem(Object key)
Removes the element with the specified key from the
T:System.Collections.IDictionary object. |
boolean |
removeItemByKey(Object o) |
void |
set_Item(Object key,
Object value)
Sets the element with the specified key.
|
int |
size()
Gets the number of elements contained in the
T:System.Collections.ICollection . |
boolean |
tryGetValue(Object o,
Object[] objects) |
public NonGenericDictionary(com.aspose.ms.System.Collections.Generic.IGenericDictionary dictionary)
Initializes a new instance of the NonGenericDictionary
class.
dictionary
- The dictionary to use.public boolean isReadOnly()
Gets a value indicating whether the
T:System.Collections.IDictionary
object is read-only.
isReadOnly
in interface com.aspose.ms.System.Collections.Generic.IGenericCollection
T:System.Collections.IDictionary
object is read-only; otherwise, false.public void addItem(Object o)
addItem
in interface com.aspose.ms.System.Collections.Generic.IGenericCollection
public boolean containsKey(Object o)
containsKey
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
public boolean removeItemByKey(Object o)
removeItemByKey
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
public boolean tryGetValue(Object o, Object[] objects)
tryGetValue
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
public com.aspose.ms.System.Collections.Generic.IGenericCollection getKeys()
Gets an
T:System.Collections.ICollection
object containing the keys of the
T:System.Collections.IDictionary
object.
getKeys
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
T:System.Collections.ICollection
object containing the keys of the T:System.Collections.IDictionary
object.public int size()
Gets the number of elements contained in the
T:System.Collections.ICollection
.
size
in interface com.aspose.ms.System.Collections.Generic.IGenericCollection
T:System.Collections.ICollection
.public com.aspose.ms.System.Collections.Generic.IGenericCollection getValues()
Gets an
T:System.Collections.ICollection
object containing the values in the
T:System.Collections.IDictionary
object.
getValues
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
T:System.Collections.ICollection
object containing the values in the T:System.Collections.IDictionary
object.public Object get_Item(Object key)
Gets or sets the element with the specified key.
get_Item
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
key
- The element key.public void set_Item(Object key, Object value)
Sets the element with the specified key.
set_Item
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
key
- The element key.value
- The element key's value.public boolean removeItem(Object key)
Removes the element with the specified key from the
T:System.Collections.IDictionary
object.
removeItem
in interface com.aspose.ms.System.Collections.Generic.IGenericCollection
key
- The key of the element to remove.public void copyToTArray(Object[] array, int index)
Copies the elements of the
T:System.Collections.ICollection
to an
T:System.Array
, starting at a particular
T:System.Array
index.
copyToTArray
in interface com.aspose.ms.System.Collections.Generic.IGenericCollection
array
- The one-dimensional
T:System.Array
that is the destination of the elements copied from
T:System.Collections.ICollection
. The
T:System.Array
must have zero-based indexing.index
- The zero-based index in
array
at which copying begins.public com.aspose.ms.System.Collections.IEnumerator iterator_IEnumerator()
Returns an enumerator that iterates through a collection.
T:System.Collections.IEnumerator
object that can be used to iterate through the collection.public void addItem(Object key, Object value)
Adds an element with the provided key and value to the
T:System.Collections.IDictionary
object.
addItem
in interface com.aspose.ms.System.Collections.Generic.IGenericDictionary
key
- The
T:System.Object
to use as the key of the element to add.value
- The
T:System.Object
to use as the value of the element to add.public void clear()
Removes all elements from the
T:System.Collections.IDictionary
object.
clear
in interface com.aspose.ms.System.Collections.Generic.IGenericCollection
public boolean containsItem(Object key)
Determines whether the
T:System.Collections.IDictionary
object contains an element with the specified key.
containsItem
in interface com.aspose.ms.System.Collections.Generic.IGenericCollection
key
- The key to locate in the
T:System.Collections.IDictionary
object.T:System.Collections.IDictionary
contains an element with the key; otherwise, false.public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<Object> iterator()
Gets the enumerator.
Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.