Package org.rcsb.cif.binary.data
Class StringArray
java.lang.Object
org.rcsb.cif.binary.data.StringArray
- All Implemented Interfaces:
EncodedData<String[]>
public class StringArray extends Object
An array of String values.
-
Constructor Summary
Constructors Constructor Description StringArray(Object data, Deque<Encoding<?,?>> encoding)StringArray(String[] data) -
Method Summary
Modifier and Type Method Description ByteArrayencode(StringArrayEncoding encoding)String[]getData()Access to the underlying array of information.Deque<Encoding<?,?>>getEncoding()All encodings registered for this piece of EncodedData.booleanhasNextDecodingStep()Convenience method to state whether the List returned byEncodedData.getEncoding()is not empty.intlength()The number of elements in the wrapped array.voidsetEncoding(Deque<Encoding<?,?>> encoding)Replace this encoding chain with a different one.StringtoString()
-
Constructor Details
-
Method Details
-
getData
Description copied from interface:EncodedDataAccess to the underlying array of information.- Returns:
- an int[], double[], byte[], or String[]
-
length
public int length()Description copied from interface:EncodedDataThe number of elements in the wrapped array.- Returns:
- results of array.length
-
toString
-
encode
-
getEncoding
Description copied from interface:EncodedDataAll encodings registered for this piece of EncodedData. May be empty. May contain only partial data: e.g. adding a ByteArrayEncoding to the list will request encoding by ByteArrayCodec, this method call will subsequently fill all fields of the requested Encoding to allow for decoding.- Specified by:
getEncodingin interfaceEncodedData<D>- Returns:
- all associated Encoding instances
-
setEncoding
Description copied from interface:EncodedDataReplace this encoding chain with a different one.- Specified by:
setEncodingin interfaceEncodedData<D>- Parameters:
encoding- the new encoding chain for this instance
-
hasNextDecodingStep
public boolean hasNextDecodingStep()Description copied from interface:EncodedDataConvenience method to state whether the List returned byEncodedData.getEncoding()is not empty.- Specified by:
hasNextDecodingStepin interfaceEncodedData<D>- Returns:
- true if encoding steps are registered and need to be resolved to access decoded data
-