Record Class TypeModel.MapOf

java.lang.Object
java.lang.Record
com.vaadin.hilla.generator.model.TypeModel.MapOf
Record Components:
javaType - the fully qualified name of the Java type the values come in, as for an array
All Implemented Interfaces:
TypeModel
Enclosing interface:
TypeModel

public static record TypeModel.MapOf(TypeModel values, boolean optional, String javaType, List<ConstraintModel> constraints, List<AnnotationModel> annotations) extends Record implements TypeModel
  • Constructor Details

    • MapOf

      public MapOf(TypeModel values, boolean optional, String javaType, List<ConstraintModel> constraints, List<AnnotationModel> annotations)
      Creates an instance of a MapOf record class.
      Parameters:
      values - the value for the values record component
      optional - the value for the optional record component
      javaType - the value for the javaType record component
      constraints - the value for the constraints record component
      annotations - the value for the annotations record component
    • MapOf

      public MapOf(TypeModel values, boolean optional, String javaType)
  • Method Details

    • withOptional

      public TypeModel.MapOf withOptional(boolean optional)
      Description copied from interface: TypeModel
      The same type, said to be absent or not as given.
      Specified by:
      withOptional in interface TypeModel
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • values

      public TypeModel values()
      Returns the value of the values record component.
      Returns:
      the value of the values record component
    • optional

      public boolean optional()
      Returns the value of the optional record component.
      Specified by:
      optional in interface TypeModel
      Returns:
      the value of the optional record component
    • javaType

      public String javaType()
      Returns the value of the javaType record component.
      Returns:
      the value of the javaType record component
    • constraints

      public List<ConstraintModel> constraints()
      Returns the value of the constraints record component.
      Specified by:
      constraints in interface TypeModel
      Returns:
      the value of the constraints record component
    • annotations

      public List<AnnotationModel> annotations()
      Returns the value of the annotations record component.
      Specified by:
      annotations in interface TypeModel
      Returns:
      the value of the annotations record component