|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjef.dna.fieldsTable.impl.def.FTable
public class FTable
Default implementation class of the FieldsTable interface.
| Field Summary | |
|---|---|
protected static Logger |
logger
|
| Constructor Summary | |
|---|---|
FTable()
Creates a new instance of FTable |
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Logger logger
| Constructor Detail |
|---|
public FTable()
| Method Detail |
|---|
public void addElement(FieldInfoStructure entry)
FieldInfoStructure at the end of the table.
addElement in interface FieldsTableentry - The entry to be added
public void 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.
addElementAt in interface FieldsTableentry - 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 implementation
public FieldInfoStructure get(int index)
throws java.lang.IndexOutOfBoundsException
get in interface FieldsTableindex - The index to access to
java.lang.IndexOutOfBoundsException - Tying to acces to an invalid index
public int getIndexOf(FieldInfoStructure entry)
throws FieldInfoStructureNotFoundException,
java.lang.UnsupportedOperationException
getIndexOf in interface FieldsTableentry - 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 implementation
public FieldInfoStructure 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
remove in interface FieldsTableindex - 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 implementation
public int remove(FieldInfoStructure entry,
boolean compact)
throws FieldInfoStructureNotFoundException,
java.lang.UnsupportedOperationException
compact is
true, otherwise the removed entry has to be replaced by null
remove in interface FieldsTableentry - The entry we want to removecompact - Has the constant pool table to be resized?
FieldInfoStructureNotFoundException - The provided entry is not stored within the current table
java.lang.UnsupportedOperationException - The method is not supported by the current implementationpublic int size()
size in interface FieldsTablepublic void addAll(FieldsTable ft)
FieldsTable to the current one.
addAll in interface FieldsTableft - The FieldsTable to be appended
public void fromStream(java.io.DataInputStream dis,
Dna dna,
int fieldsCount)
throws MissingDnaContainerException,
DnaDeserializationException
fromStream in interface FieldsTabledis - The stream for reading the table fromdna - The Dna container instancefieldsCount - The number of expected fields
MissingDnaContainerException - This exception is thrown iff no valid Dna instance has been set
DnaDeserializationException
public void toStream(java.io.DataOutputStream dos)
throws DnaSerializationException
toStream in interface FieldsTabledos - The stream for writing the FiledsTable instance to
DnaSerializationExceptionpublic void setDna(Dna dna)
Dna container
setDna in interface FieldsTabledna - The Dna containerpublic Dna getDna()
Dna container
getDna in interface FieldsTableDna container
public void validate()
throws FieldInfoValidationException,
InfoStructureAttributeOutOfRangeException,
MissingDnaContainerException,
MissingCPTableException
FieldsTableFieldsTable entries.
validate in interface FieldsTableFieldInfoValidationException
InfoStructureAttributeOutOfRangeException
MissingDnaContainerException
MissingCPTableException
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
FieldsTable instance.
clone in interface FieldsTableclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||