Package adql.query
Class ClauseADQL<T extends ADQLObject>
- java.lang.Object
-
- adql.query.ADQLList<T>
-
- adql.query.ClauseADQL<T>
-
- All Implemented Interfaces:
ADQLObject
,java.lang.Iterable<T>
- Direct Known Subclasses:
ClauseConstraints
,ClauseSelect
public class ClauseADQL<T extends ADQLObject> extends ADQLList<T>
Represents an ADQL clause (i.e. SELECT, FROM, WHERE, ...).- Version:
- 1.2 (12/2013)
- Author:
- Grégory Mantelet (CDS;ARI)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adql.query.ADQLList
ADQLList.ADQLListIterator
-
-
Constructor Summary
Constructors Constructor Description ClauseADQL()
Builds an anonymous ClauseADQL.ClauseADQL(ADQLList<T> toCopy)
Builds a ClauseADQL by copying the given one.ClauseADQL(java.lang.String name)
Builds a ClauseADQL considering its name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ADQLObject
getCopy()
Gets a (deep) copy of this ADQL object.java.lang.String[]
getPossibleSeparators()
Possible separators: only ",".java.lang.String
getSeparator(int index)
Returns always ",", except if the index is incorrect (index <= 0 or index >= size()).-
Methods inherited from class adql.query.ADQLList
add, add, adqlIterator, clear, get, getName, getPosition, isEmpty, iterator, remove, set, setPosition, size, toADQL
-
-
-
-
Constructor Detail
-
ClauseADQL
public ClauseADQL()
Builds an anonymous ClauseADQL.
-
ClauseADQL
public ClauseADQL(java.lang.String name)
Builds a ClauseADQL considering its name.- Parameters:
name
- List label.
-
ClauseADQL
public ClauseADQL(ADQLList<T> toCopy) throws java.lang.Exception
Builds a ClauseADQL by copying the given one. It copies also all the list items of the given ClauseADQL.- Parameters:
toCopy
- The ClauseADQL to copy.- Throws:
java.lang.Exception
- If there is an unexpected error during the copy.
-
-
Method Detail
-
getCopy
public ADQLObject getCopy() throws java.lang.Exception
Description copied from interface:ADQLObject
Gets a (deep) copy of this ADQL object.- Specified by:
getCopy
in interfaceADQLObject
- Specified by:
getCopy
in classADQLList<T extends ADQLObject>
- Returns:
- The copy of this ADQL object.
- Throws:
java.lang.Exception
- If there is any error during the copy.
-
getPossibleSeparators
public java.lang.String[] getPossibleSeparators()
Possible separators: only ",".- Specified by:
getPossibleSeparators
in classADQLList<T extends ADQLObject>
- Returns:
- Possible separators.
- See Also:
ADQLList.getPossibleSeparators()
-
getSeparator
public java.lang.String getSeparator(int index) throws java.lang.ArrayIndexOutOfBoundsException
Returns always ",", except if the index is incorrect (index <= 0 or index >= size()).- Specified by:
getSeparator
in classADQLList<T extends ADQLObject>
- Parameters:
index
- Index of the right list item.- Returns:
- The corresponding separator.
- Throws:
java.lang.ArrayIndexOutOfBoundsException
- If the index is less or equal than 0, or is greater or equal thansize()
.- See Also:
ADQLList.getSeparator(int)
-
-