Skip to main content
Version: Java (Groovy)

hasAttribute

The hasAttribute method checks if the specified method exists in the source table's AttributeMap.

Syntax

table.hasAttribute(key)

Parameters

ParameterTypeDescription
key>String

The name of the attribute.

Returns

A Boolean that is True if the specified attribute exists in the source table's AttributeMap, or False if it does not.

Examples

In this example, we create an Input Table and then print the result of a call to hasAttribute().

import io.deephaven.engine.table.impl.util.AppendOnlyArrayBackedInputTable
import io.deephaven.engine.table.AttributeMap

source = newTable(
doubleCol("Doubles", 3.1, 5.45, -1.0),
stringCol("Strings", "Creating", "New", "Tables")
)

result = AppendOnlyArrayBackedInputTable.make(source)

println result.hasAttribute("AddOnly")