org.objectweb.medor.lib
Class BasicTupleStructure
BasicCloneable
org.objectweb.medor.lib.BasicTupleStructure
- Cloneable, TupleStructure
public class BasicTupleStructure
extends BasicCloneable
MEDOR: Middleware Enabling Distributed Object Requests
Copyright (C) 2001-2003 France Telecom R&D
Contact: alexandre.lefebvre@rd.francetelecom.com
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Initial developers: M. Alia, A. Lefebvre
Object | clone(Object clone, Map obj2clone)
|
boolean | contains(String fieldName) - Checks whether the current TupleStructure has a field of a given name.
|
boolean | contains(Field f) - Checks whether a given input Field is present in the current
TupleStructure.
|
Field | getField(String fieldname) - Returns a Field object present in this TupleStructure given its name.
|
Field | getField(int fieldrank) - Returns the Field of a given rank in the current TupleStructure.
|
int | getFieldRank(Field f) - Returns the rank of a given Field in the current TupleStructure.
|
Field[] | getFields() - Returns the array of Fields in the current TupleStructure.
|
int | getSize() - Returns the size of the current TupleStructure, ie the number of
Fields.
|
fields
protected ArrayList fields
logger
protected Logger logger
name2field
protected HashMap name2field
BasicTupleStructure
protected BasicTupleStructure()
clone
public Object clone(Object clone,
Map obj2clone)
throws CloneNotSupportedException
contains
public boolean contains(String fieldName)
Checks whether the current TupleStructure has a field of a given name.
- contains in interface TupleStructure
fieldName
- the Field name for which to check whether the current
TupleStructure contains a Field.
- true if the current TupleStructure contains a Field of the input
name, false otherwise.
contains
public boolean contains(Field f)
Checks whether a given input Field is present in the current
TupleStructure.
- contains in interface TupleStructure
f
- the Field for which to check whether it is present in the
current TupleStructure.
- true if the Field is part of the current TupleStructure, false
otherwise.
getField
public Field getField(String fieldname)
throws MedorException
Returns a Field object present in this TupleStructure given its name.
- getField in interface TupleStructure
fieldname
- the name of the searched Field
- the Field in the current TupleStructure which has the input name.
MedorException
- if no Field corresponds to the input name.
getField
public Field getField(int fieldrank)
throws MedorException
Returns the Field of a given rank in the current TupleStructure.
- getField in interface TupleStructure
fieldrank
- the rank of the searched Field in the current
TupleStructure
- the Field in the current TupleStructure corresponding to the
input rank.
MedorException
- if the input rank is too large.
getFieldRank
public int getFieldRank(Field f)
throws MedorException
Returns the rank of a given Field in the current TupleStructure.
- getFieldRank in interface TupleStructure
f
- the Field for which the rank is searched.
- the rank of the input Field in the current TupleStructure.
MedorException
- if there is no such Field in the current
TupleStructure.
getFields
public Field[] getFields()
Returns the array of Fields in the current TupleStructure.
- getFields in interface TupleStructure
- the array of Fields in the current TupleStructure.
getSize
public int getSize()
Returns the size of the current TupleStructure, ie the number of
Fields.
- getSize in interface TupleStructure
- the number of Fields in the current TupleStructure.