Package org.apache.calcite.rel.core
Class CorrelationId
- java.lang.Object
-
- org.apache.calcite.rel.core.CorrelationId
-
- All Implemented Interfaces:
Cloneable
,Comparable<CorrelationId>
public class CorrelationId extends Object implements Cloneable, Comparable<CorrelationId>
Describes the necessary parameters for an implementation in order to identify and set dynamic variables.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CORREL_PREFIX
Prefix to the name of correlating variables.
-
Constructor Summary
Constructors Constructor Description CorrelationId(int id)
Creates a correlation identifier.CorrelationId(String name)
Creates a correlation identifier from a name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(CorrelationId other)
boolean
equals(@Nullable Object obj)
int
getId()
Returns the identifier.String
getName()
Returns the preferred name of the variable.int
hashCode()
static Set<String>
names(Set<CorrelationId> set)
Converts a set of names to a set of correlation ids.static com.google.common.collect.ImmutableSet<CorrelationId>
setOf(Set<String> set)
Converts a set of correlation ids to a set of names.String
toString()
-
-
-
Field Detail
-
CORREL_PREFIX
public static final String CORREL_PREFIX
Prefix to the name of correlating variables.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CorrelationId
public CorrelationId(int id)
Creates a correlation identifier. This is a type-safe wrapper over int.- Parameters:
id
- Identifier
-
CorrelationId
public CorrelationId(String name)
Creates a correlation identifier from a name.- Parameters:
name
- variable name
-
-
Method Detail
-
getId
public int getId()
Returns the identifier.- Returns:
- identifier
-
getName
public String getName()
Returns the preferred name of the variable.- Returns:
- name
-
compareTo
public int compareTo(CorrelationId other)
- Specified by:
compareTo
in interfaceComparable<CorrelationId>
-
setOf
public static com.google.common.collect.ImmutableSet<CorrelationId> setOf(Set<String> set)
Converts a set of correlation ids to a set of names.
-
names
public static Set<String> names(Set<CorrelationId> set)
Converts a set of names to a set of correlation ids.
-
-