Package uk.ac.bristol.star.cdf
Class AttributeEntry
java.lang.Object
uk.ac.bristol.star.cdf.AttributeEntry
Represents an entry in a global or variable attribute.
- Since:
- 28 Jun 2013
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the data type of this entry.getItem
(int itemIndex) Returns an object representing one of the items in this entry.int
Returns the number of items in this entry.Returns the array object storing the original representation of the object in the CDF.Returns the value of this entry as a convenient object.toString()
Formats the value of this entry as a string.
-
Constructor Details
-
AttributeEntry
Constructor.- Parameters:
dataType
- data typerawValue
- array object storing original representation of the object in the CDF (array of primitives or Strings)nitem
- number of items represented by the array
-
-
Method Details
-
getDataType
Returns the data type of this entry.- Returns:
- data type
-
getRawValue
Returns the array object storing the original representation of the object in the CDF. This is either an array of either primitives or Strings.- Returns:
- raw array value
-
getShapedValue
Returns the value of this entry as a convenient object. If the item count is 1 it's the same asgetItem(0)
, and if the item count is >1 it's the same as the raw value.- Returns:
- shaped entry value
-
getItemCount
public int getItemCount()Returns the number of items in this entry.- Returns:
- item count
-
getItem
Returns an object representing one of the items in this entry. If the raw array is a primitive, the result is a wrapper object.- Parameters:
itemIndex
- item index- Returns:
- value of item
-
toString
Formats the value of this entry as a string.
-