public class TableValueSupport extends AbstractMetaValue implements TableValue
Constructor and Description |
---|
TableValueSupport(TableMetaType tableType)
Construct Table Value with an initial capacity of 101 and a load
factor of 0.75
|
TableValueSupport(TableMetaType tableType,
int initialCapacity,
float loadFactor)
Construct Table value
|
Modifier and Type | Method and Description |
---|---|
MetaValue[] |
calculateIndex(CompositeValue value)
Calculate the index for the value passed if it were added to the
table value.
|
void |
clear()
Removes all CompositeValues from the Table value
|
TableValueSupport |
clone()
Clone the meta value
|
boolean |
containsKey(MetaValue[] key)
Determine whether the table value contains the passed value as a row.
|
boolean |
containsValue(CompositeValue value)
Determine whether the table value contains the passed value.
|
boolean |
equals(Object obj) |
CompositeValue |
get(MetaValue[] key)
Retrieve the composite value for the passed index.
|
TableMetaType |
getMetaType()
Get the metatype for this value
|
int |
hashCode() |
boolean |
isEmpty()
Determine whether the table value is empty.
|
Set<List<MetaValue>> |
keySet()
Returns a set view of the index values.
|
void |
put(CompositeValue value)
Add a value to the table value.
|
void |
putAll(CompositeValue[] values)
Add all the passed values.
|
CompositeValue |
remove(MetaValue[] key)
Removes the value for the passed and returns the removed value, or
null if the key was not present.
|
int |
size()
Retrieve the number of rows in the table value.
|
String |
toString() |
Collection<CompositeValue> |
values()
Returns a set view of the row values.
|
public TableValueSupport(TableMetaType tableType)
tableType
- the table type of the dataIllegalArgumentException
- for a null argumentpublic TableValueSupport(TableMetaType tableType, int initialCapacity, float loadFactor)
tableType
- the table typeinitialCapacity
- the initial capacity of the maploadFactor
- the load factory of the mapIllegalArgumentException
- for a null argumentpublic TableMetaType getMetaType()
MetaValue
getMetaType
in interface MetaValue
getMetaType
in interface TableValue
public MetaValue[] calculateIndex(CompositeValue value)
TableValue
calculateIndex
in interface TableValue
value
- the value for which the index is calculated.public void clear()
TableValue
clear
in interface TableValue
public boolean containsKey(MetaValue[] key)
TableValue
containsKey
in interface TableValue
key
- the value to checkpublic boolean containsValue(CompositeValue value)
TableValue
containsValue
in interface TableValue
value
- the value to checkpublic CompositeValue get(MetaValue[] key)
TableValue
get
in interface TableValue
key
- the index to retrievepublic boolean isEmpty()
TableValue
isEmpty
in interface TableValue
public Set<List<MetaValue>> keySet()
TableValue
keySet
in interface TableValue
public void put(CompositeValue value)
TableValue
put
in interface TableValue
value
- the value to addpublic void putAll(CompositeValue[] values)
TableValue
putAll
in interface TableValue
values
- the values to addpublic CompositeValue remove(MetaValue[] key)
TableValue
remove
in interface TableValue
key
- the index of the value to removepublic int size()
TableValue
size
in interface TableValue
public Collection<CompositeValue> values()
TableValue
values
in interface TableValue
public TableValueSupport clone()
MetaValue
clone
in interface MetaValue
clone
in class AbstractMetaValue
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.