Skip to content

Class Type<T extends Type<T>>

Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.

java.lang.Object
dev.gecode.iris.build.Type<T>
Type Parameters:
T - the type that adding a dimension or an option gives
Direct Known Subclasses:
FloatType, IntType, NumType, StringType
public abstract sealed class Type<T extends Type<T>> extends Object permits IntType, FloatType, NumType, StringType
A reading type, such as int, 0..<n or word. dim(Expr) adds a dimension, and layout(Expr) and offset(Expr) add the options of a declaration.
  • Method Summary

    Modifier and Type
    Method
    Description
    final T
    dim(long size)
    Returns this type with another dimension: x[size]: type.
    final T
    dim(Expr size)
    Returns this type with another dimension: x[size]: type.
    final T
    dims(long... sizes)
    Returns this type with several more dimensions, as many as known only at run time.
    final T
    dims(List<? extends Expr> sizes)
    Returns this type with several more dimensions, as many as known only at run time.
    final T
    layout(long layout)
    Returns this type with layout expression.
    final T
    layout(Expr layout)
    Returns this type with layout expression.
    final T
    offset(long offset)
    Returns this type with offset expression.
    final T
    offset(Expr offset)
    Returns this type with offset expression.
    until(long end)
    Returns a list of this type that ends at the sentinel end.
    until(Expr end)
    Returns a list of this type that ends at the sentinel end.
    Returns a list of this type that ends at the sentinel end.
    Returns a list of this type that ends at the end of the line: until eol.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • dim

      public final T dim(Expr size)
      Returns this type with another dimension: x[size]: type.
      Parameters:
      size - the number of elements
      Returns:
      this type with another dimension: x[size]: type
    • dim

      public final T dim(long size)
      Returns this type with another dimension: x[size]: type.
      Parameters:
      size - the number of elements
      Returns:
      this type with another dimension: x[size]: type
    • dims

      public final T dims(long... sizes)
      Returns this type with several more dimensions, as many as known only at run time.
      Parameters:
      sizes - the numbers of elements, outermost first
      Returns:
      this type with several more dimensions, as many as known only at run time
    • dims

      public final T dims(List<? extends Expr> sizes)
      Returns this type with several more dimensions, as many as known only at run time.
      Parameters:
      sizes - the numbers of elements, outermost first
      Returns:
      this type with several more dimensions, as many as known only at run time
    • layout

      public final T layout(Expr layout)
      Returns this type with layout expression.
      Parameters:
      layout - the layout
      Returns:
      this type with layout expression
    • layout

      public final T layout(long layout)
      Returns this type with layout expression.
      Parameters:
      layout - the layout
      Returns:
      this type with layout expression
    • offset

      public final T offset(Expr offset)
      Returns this type with offset expression.
      Parameters:
      offset - the offset
      Returns:
      this type with offset expression
    • offset

      public final T offset(long offset)
      Returns this type with offset expression.
      Parameters:
      offset - the offset
      Returns:
      this type with offset expression
    • until

      public final ListReading until(Expr end)
      Returns a list of this type that ends at the sentinel end.
      Parameters:
      end - the sentinel
      Returns:
      a list of this type that ends at the sentinel end
      Throws:
      IllegalArgumentException - if this type has dimensions
    • until

      public final ListReading until(long end)
      Returns a list of this type that ends at the sentinel end.
      Parameters:
      end - the sentinel
      Returns:
      a list of this type that ends at the sentinel end
      Throws:
      IllegalArgumentException - if this type has dimensions
    • until

      public final ListReading until(String end)
      Returns a list of this type that ends at the sentinel end.
      Parameters:
      end - the sentinel
      Returns:
      a list of this type that ends at the sentinel end
      Throws:
      IllegalArgumentException - if this type has dimensions
    • untilEol

      public final ListReading untilEol()
      Returns a list of this type that ends at the end of the line: until eol.
      Returns:
      a list of this type that ends at the end of the line: until eol
      Throws:
      IllegalArgumentException - if this type has dimensions