com.datumbox.framework.common.dataobjects
Class AssociativeArray2D
- java.lang.Object
-
- com.datumbox.framework.common.dataobjects.AbstractDataStructure<T>
-
- com.datumbox.framework.common.dataobjects.AbstractDataStructureMap<java.util.Map<java.lang.Object,AssociativeArray>>
-
- com.datumbox.framework.common.dataobjects.AssociativeArray2D
-
- All Implemented Interfaces:
- Copyable<AssociativeArray2D>, java.io.Serializable
- Direct Known Subclasses:
- DataTable2D
public class AssociativeArray2D extends AbstractDataStructureMap<java.util.Map<java.lang.Object,AssociativeArray>> implements Copyable<AssociativeArray2D>
Data structure which stores internally a Map- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description AssociativeArray2D()Default constructor which initializes the internal data with a LinkedHashMap.AssociativeArray2D(java.util.Map<java.lang.Object,AssociativeArray> internalData)Constructor that initializes the internal data with the provided map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AssociativeArray2Dcopy()Copies itself and returns a new instance of the same type.java.util.Set<java.util.Map.Entry<java.lang.Object,AssociativeArray>>entrySet()Returns the entrySet of the internal map.booleanequals(java.lang.Object o)AssociativeArrayget(java.lang.Object key)Returns the value which is associated with the provided key.java.lang.Objectget2d(java.lang.Object key1, java.lang.Object key2)Convenience function to get the value by using both keys.inthashCode()java.util.Set<java.lang.Object>keySet()Returns the keySet of the internal map.AssociativeArrayput(java.lang.Object key, AssociativeArray value)Adds a particular key-value into the internal map.java.lang.Objectput2d(java.lang.Object key1, java.lang.Object key2, java.lang.Object value)Convenience function used to put a value in a particular key positions.AssociativeArrayremove(java.lang.Object key)Removes a particular key from the internal map and returns the value associated with that key if present in the map.java.util.Collection<AssociativeArray>values()Returns the values of the internal map.-
Methods inherited from class com.datumbox.framework.common.dataobjects.AbstractDataStructureMap
clear, containsKey, isEmpty, size
-
-
-
-
Constructor Detail
-
AssociativeArray2D
public AssociativeArray2D()
Default constructor which initializes the internal data with a LinkedHashMap.
-
AssociativeArray2D
public AssociativeArray2D(java.util.Map<java.lang.Object,AssociativeArray> internalData)
Constructor that initializes the internal data with the provided map.- Parameters:
internalData-
-
-
Method Detail
-
copy
public AssociativeArray2D copy()
Copies itself and returns a new instance of the same type.- Specified by:
copyin interfaceCopyable<AssociativeArray2D>- Returns:
-
remove
public final AssociativeArray remove(java.lang.Object key)
Removes a particular key from the internal map and returns the value associated with that key if present in the map.- Parameters:
key-- Returns:
-
get
public final AssociativeArray get(java.lang.Object key)
Returns the value which is associated with the provided key.- Parameters:
key-- Returns:
-
put
public final AssociativeArray put(java.lang.Object key, AssociativeArray value)
Adds a particular key-value into the internal map. It returns the previous value which was associated with that key.- Parameters:
key-value-- Returns:
-
entrySet
public final java.util.Set<java.util.Map.Entry<java.lang.Object,AssociativeArray>> entrySet()
Returns the entrySet of the internal map.- Returns:
-
keySet
public final java.util.Set<java.lang.Object> keySet()
Returns the keySet of the internal map.- Returns:
-
values
public final java.util.Collection<AssociativeArray> values()
Returns the values of the internal map.- Returns:
-
get2d
public final java.lang.Object get2d(java.lang.Object key1, java.lang.Object key2)Convenience function to get the value by using both keys.- Parameters:
key1-key2-- Returns:
-
put2d
public final java.lang.Object put2d(java.lang.Object key1, java.lang.Object key2, java.lang.Object value)Convenience function used to put a value in a particular key positions.- Parameters:
key1-key2-value-- Returns:
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG