Class Block

java.lang.Object
All Implemented Interfaces:
java.io.Serializable

public class Block
extends TCSResource<Block>
implements java.io.Serializable
An aggregation of resources with distinct usage rules depending on the block's type.
See Also:
TCSResource, Serialized Form
  • Constructor Details

    • Block

      public Block​(java.lang.String name)
      Creates an empty block.
      Parameters:
      name - This block's name.
  • Method Details

    • withProperty

      public Block withProperty​(java.lang.String key, java.lang.String value)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given property integrated.
      Specified by:
      withProperty in class TCSObject<Block>
      Parameters:
      key - The key of the property to be changed.
      value - The new value of the property, or null, if the property is to be removed.
      Returns:
      A copy of this object, with the given property integrated.
    • withProperties

      public Block withProperties​(java.util.Map<java.lang.String,​java.lang.String> properties)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given properties.
      Specified by:
      withProperties in class TCSObject<Block>
      Parameters:
      properties - The properties.
      Returns:
      A copy of this object, with the given properties.
    • withHistoryEntry

      public TCSObject<Block> withHistoryEntry​(ObjectHistory.Entry entry)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given history entry integrated.
      Specified by:
      withHistoryEntry in class TCSObject<Block>
      Parameters:
      entry - The history entry to be integrated.
      Returns:
      A copy of this object, with the given history entry integrated.
    • withHistory

      public TCSObject<Block> withHistory​(ObjectHistory history)
      Description copied from class: TCSObject
      Creates a copy of this object, with the given history.
      Specified by:
      withHistory in class TCSObject<Block>
      Parameters:
      history - The history.
      Returns:
      A copy of this object, with the given history.
    • getType

      public Block.Type getType()
      Retruns the type of this block.
      Returns:
      The type of this block.
    • withType

      public Block withType​(Block.Type type)
      Creates a copy of this object, with the given type.
      Parameters:
      type - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getMembers

      public java.util.Set<TCSResourceReference<?>> getMembers()
      Returns an unmodifiable set of all members of this block.
      Returns:
      An unmodifiable set of all members of this block.
    • withMembers

      public Block withMembers​(java.util.Set<TCSResourceReference<?>> members)
      Creates a copy of this object, with the given members.
      Parameters:
      members - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.