Class ArrayType

java.lang.Object
io.xpipe.core.data.type.DataType
io.xpipe.core.data.type.ArrayType

public class ArrayType extends DataType
An array type represents an array of DataStructureNode of a certain shared type. The shared type should be the most specific data type possible.
  • Constructor Details

    • ArrayType

      public ArrayType()
  • Method Details

    • of

      public static ArrayType of(DataType type)
      Creates a new array type for a given shared data type.
    • ofSharedType

      public static ArrayType ofSharedType(List<DataType> types)
      Creates a new array type using either the shared type of types or a wildcard type if the elements do not share a common type.
    • getName

      public String getName()
      Description copied from class: DataType
      Returns the readable name of this data type that can be used for error messages.
      Specified by:
      getName in class DataType
    • convert

      Description copied from class: DataType
      Checks whether a node can be converted to this data type.
      Specified by:
      convert in class DataType
    • matches

      public boolean matches(DataStructureNode node)
      Description copied from class: DataType
      Checks whether a node conforms to this data type.
      Specified by:
      matches in class DataType
    • isArray

      public boolean isArray()
      Description copied from class: DataType
      Checks whether this type is an array.
      Overrides:
      isArray in class DataType
    • visit

      public void visit(DataTypeVisitor visitor)
      Description copied from class: DataType
      Visits this type using a DataTypeVisitor instance.
      Specified by:
      visit in class DataType