Package adql.query.operand
Class Concatenation
- java.lang.Object
-
- adql.query.ADQLList<ADQLOperand>
-
- adql.query.operand.Concatenation
-
- All Implemented Interfaces:
ADQLObject,ADQLOperand,java.lang.Iterable<ADQLOperand>
public final class Concatenation extends ADQLList<ADQLOperand> implements ADQLOperand
Represents a concatenation in ADQL (ex: "_s_ra" || ':' || "_s_dec").- Version:
- 1.4 (09/2017)
- 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 Concatenation()Builds an empty concatenation.Concatenation(Concatenation toCopy)Builds a copy of the givenConcatenation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ADQLObjectgetCopy()Gets a (deep) copy of this ADQL object.java.lang.String[]getPossibleSeparators()Gets the list of all possible separators for thisADQLList.java.lang.StringgetSeparator(int index)Gets the separator between the list items index-1 and index.booleanisGeometry()Tell whether this operand is a geometrical region or not.booleanisNumeric()Tell whether this operand is numeric or not.booleanisString()Tell whether this operand is a string or not.java.lang.StringtoADQL()Gets the ADQL expression of this object.-
Methods inherited from class adql.query.ADQLList
add, add, adqlIterator, clear, get, getName, getPosition, isEmpty, iterator, remove, set, setPosition, size
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface adql.query.ADQLObject
adqlIterator, getName, getPosition
-
-
-
-
Constructor Detail
-
Concatenation
public Concatenation()
Builds an empty concatenation. To add operands, use the "add" functions.
-
Concatenation
public Concatenation(Concatenation toCopy) throws java.lang.Exception
Builds a copy of the givenConcatenation.- Parameters:
toCopy- TheConcatenationto copy.- Throws:
java.lang.Exception- If there is an error during the copy.
-
-
Method Detail
-
getCopy
public ADQLObject getCopy() throws java.lang.Exception
Description copied from interface:ADQLObjectGets a (deep) copy of this ADQL object.- Specified by:
getCopyin interfaceADQLObject- Specified by:
getCopyin classADQLList<ADQLOperand>- 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()
Description copied from class:ADQLListGets the list of all possible separators for thisADQLList.- Specified by:
getPossibleSeparatorsin classADQLList<ADQLOperand>- Returns:
- Possible separators.
-
getSeparator
public java.lang.String getSeparator(int index) throws java.lang.ArrayIndexOutOfBoundsExceptionDescription copied from class:ADQLListGets the separator between the list items index-1 and index.- Specified by:
getSeparatorin classADQLList<ADQLOperand>- 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().
-
isNumeric
public final boolean isNumeric()
Description copied from interface:ADQLOperandTell whether this operand is numeric or not.- Specified by:
isNumericin interfaceADQLOperand- Returns:
- true if this operand is numeric, false otherwise.
-
isString
public final boolean isString()
Description copied from interface:ADQLOperandTell whether this operand is a string or not.- Specified by:
isStringin interfaceADQLOperand- Returns:
- true if this operand is a string, false otherwise.
-
isGeometry
public final boolean isGeometry()
Description copied from interface:ADQLOperandTell whether this operand is a geometrical region or not.- Specified by:
isGeometryin interfaceADQLOperand- Returns:
- true if this operand is a geometry, false otherwise.
-
toADQL
public java.lang.String toADQL()
Description copied from interface:ADQLObjectGets the ADQL expression of this object.- Specified by:
toADQLin interfaceADQLObject- Overrides:
toADQLin classADQLList<ADQLOperand>- Returns:
- The corresponding ADQL expression.
-
-