|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldsTable
This interface defines the methods every implementation class has to provide in order to grant
access to the FieladInfoStructures
contained within a Java class represented by
the the Dna
instance this FieldsTable
belongs to.
Method Summary | |
---|---|
void |
addAll(FieldsTable ft)
Appends the given FieldsTable to the current one. |
void |
addElement(FieldInfoStructure entry)
Adds the specified FieldInfoStructure at the end of the table. |
void |
addElementAt(FieldInfoStructure entry,
int index,
boolean overwrite)
Adds the specified FieldInfoStructure at the provided position, shifting of
one index any subsequente entry (if exists) iff the overwrite parameter is set
to false , otherwise the current entry at index index will be
overwritten. |
java.lang.Object |
clone()
Clone the current FieldsTable instance. |
void |
fromStream(java.io.DataInputStream dis,
Dna dna,
int fieldsCount)
Reads the table from the given stream. |
FieldInfoStructure |
get(int index)
Get a reference to the entry stored at the provided index. |
Dna |
getDna()
Get the Dna container |
int |
getIndexOf(FieldInfoStructure entry)
Return the index of the provided entry, if exists. |
int |
remove(FieldInfoStructure entry,
boolean compact)
Removes the specified entry, if exists, resizing the table if compact is
true , otherwise the removed entry has to be replaced by null |
FieldInfoStructure |
remove(int index,
boolean compact)
Removes the entry at the specified index, if exists, resizing the table if compact is true , otherwise the removed entry has to be
replaced by null |
void |
setDna(Dna dna)
Set the Dna container |
int |
size()
Returns the number of entries stored by the table |
void |
toStream(java.io.DataOutputStream dos)
Writes the table to the given output stream. |
void |
validate()
This method performs the validation over all the FieldsTable entries. |
Method Detail |
---|
void addElement(FieldInfoStructure entry)
FieldInfoStructure
at the end of the table.
entry
- The entry to be addedvoid addElementAt(FieldInfoStructure entry, int index, boolean overwrite) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
FieldInfoStructure
at the provided position, shifting of
one index any subsequente entry (if exists) iff the overwrite
parameter is set
to false
, otherwise the current entry at index index
will be
overwritten.
entry
- The entry to be addedindex
- The position at which the entry should be placedoverwrite
- Should any existing entry be overwritten?
java.lang.IndexOutOfBoundsException
- Trying to access to an invalid index
java.lang.UnsupportedOperationException
- The method is not supported by the current implementationFieldInfoStructure get(int index) throws java.lang.IndexOutOfBoundsException
index
- The index to access to
java.lang.IndexOutOfBoundsException
- Tying to acces to an invalid indexint getIndexOf(FieldInfoStructure entry) throws FieldInfoStructureNotFoundException, java.lang.UnsupportedOperationException
entry
- The entry whose index has to be returned
FieldInfoStructureNotFoundException
- The provided entry is not stored within the current table
java.lang.UnsupportedOperationException
- The method is not supported by the current implementationFieldInfoStructure remove(int index, boolean compact) throws java.lang.IndexOutOfBoundsException, java.lang.UnsupportedOperationException
compact
is true
, otherwise the removed entry has to be
replaced by null
index
- The index of the entry we want to removecompact
- Has the table to be resized?
java.lang.IndexOutOfBoundsException
- Tying to acces to an invalid index
java.lang.UnsupportedOperationException
- The method is not supported by the current implementationint remove(FieldInfoStructure entry, boolean compact) throws FieldInfoStructureNotFoundException, java.lang.UnsupportedOperationException
compact
is
true
, otherwise the removed entry has to be replaced by null
entry
- The entry to be removede.compact
- Tells whether the table should be compacted or not.
FieldInfoStructureNotFoundException
- The provided entry is not stored within the current table
java.lang.UnsupportedOperationException
- The method is not supported by the current implementationint size()
void addAll(FieldsTable ft)
FieldsTable
to the current one.
ft
- The whole FieldsTable
to be added to the current one.java.lang.Object clone() throws java.lang.CloneNotSupportedException
FieldsTable
instance.
java.lang.CloneNotSupportedException
void fromStream(java.io.DataInputStream dis, Dna dna, int fieldsCount) throws MissingDnaContainerException, DnaDeserializationException
dis
- The InputStream
from which the FieldsTable
has to be
readdna
- The Dna
this FieldsTable
belongs tofieldsCount
- The number of expected fields
DnaDeserializationException
MissingDnaContainerException
- This exception is thrown iff no valid Dna
instance has been setvoid toStream(java.io.DataOutputStream dos) throws DnaSerializationException
dos
- The OutputStream
the current FieldsTable
should be
written to.
DnaSerializationException
void setDna(Dna dna)
Dna
container
dna
- The Dna
container.Dna getDna()
Dna
container
Dna
containervoid validate() throws FieldInfoValidationException, InfoStructureAttributeOutOfRangeException, MissingDnaContainerException, MissingCPTableException
FieldsTable
entries.
FieldInfoValidationException
InfoStructureAttributeOutOfRangeException
MissingDnaContainerException
MissingCPTableException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |