Class Table
java.lang.Object
com.hubspot.slack.client.models.blocks.Table
- All Implemented Interfaces:
BlockOrAttachment,Block,ContainerChildBlock,TableIF,ChatUnfurlBlocksOrAttachment
@Generated(from="TableIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Table
extends Object
implements TableIF
Immutable implementation of
TableIF.
Use the builder to create immutable instances:
Table.builder().
Use the static factory method to create immutable instances:
Table.of().
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Table.Builderbuilder()Creates a builder forTable.static TableCreates an immutable copy of aTableIFvalue.booleanThis instance is equal to all instances ofTablethat have equal attribute values.com.google.common.collect.ImmutableList<TableColumnSetting> com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<TableCell>> getRows()getType()inthashCode()Computes a hash code from attributes:blockId,type,rows,columnSettings.static Tableof(com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<TableCell>> rows) Construct a new immutableTableinstance.static TableConstruct a new immutableTableinstance.toString()Prints the immutable valueTablewith attribute values.final TablewithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final TablewithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final TablewithColumnSettings(TableColumnSetting... elements) Copy the current immutable object with elements that replace the content ofcolumnSettings.final TablewithColumnSettings(Iterable<? extends TableColumnSetting> elements) Copy the current immutable object with elements that replace the content ofcolumnSettings.final TableCopy the current immutable object with elements that replace the content ofrows.final TableCopy the current immutable object with elements that replace the content ofrows.
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
-
getRows
public com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<TableCell>> getRows() -
getColumnSettings
- Specified by:
getColumnSettingsin interfaceTableIF- Returns:
- The value of the
columnSettingsattribute
-
withBlockId
Copy the current immutable object by setting a present value for the optionalblockIdattribute.- Parameters:
value- The value for blockId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBlockId
Copy the current immutable object by setting an optional value for theblockIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for blockId- Returns:
- A modified copy or
thisif not changed
-
withRows
@SafeVarargs public final Table withRows(com.google.common.collect.ImmutableList<TableCell>... elements) Copy the current immutable object with elements that replace the content ofrows.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRows
public final Table withRows(Iterable<? extends com.google.common.collect.ImmutableList<TableCell>> elements) Copy the current immutable object with elements that replace the content ofrows. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of rows elements to set- Returns:
- A modified copy or
thisif not changed
-
withColumnSettings
Copy the current immutable object with elements that replace the content ofcolumnSettings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withColumnSettings
Copy the current immutable object with elements that replace the content ofcolumnSettings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of columnSettings elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofTablethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,rows,columnSettings. -
toString
Prints the immutable valueTablewith attribute values. -
of
public static Table of(com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableList<TableCell>> rows) Construct a new immutableTableinstance.- Parameters:
rows- The value for therowsattribute- Returns:
- An immutable Table instance
-
of
Construct a new immutableTableinstance.- Parameters:
rows- The value for therowsattribute- Returns:
- An immutable Table instance
-
copyOf
Creates an immutable copy of aTableIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Table instance
-
builder
Creates a builder forTable.Table.builder() .setBlockId(Optional<String>) // optionalblockId.addRows|addAllRows(com.google.common.collect.ImmutableList<com.hubspot.slack.client.models.blocks.table.TableCell>) //rowselements .addColumnSettings|addAllColumnSettings(com.hubspot.slack.client.models.blocks.table.TableColumnSetting) //columnSettingselements .build();- Returns:
- A new Table builder
-