Package cdc.issues

Interface FormalParam

All Superinterfaces:
Comparable<FormalParam>
All Known Implementing Classes:
FormalParamImpl

public interface FormalParam extends Comparable<FormalParam>
Definition of a formal parameter. It has:
  • A name
  • An optional description
Author:
Damien Carbonne
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    static boolean
    Returns true if a string is a valid name: It cannot be null It cannot be empty It cannot contain any space or control character
    of(String name, String description)
    Creates a FormalParam.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • getName

      String getName()
      Returns:
      The formal parameter name.
    • getDescription

      String getDescription()
      Returns:
      The formal parameter description.
    • of

      static FormalParam of(String name, String description)
      Creates a FormalParam.
      Parameters:
      name - The name.
      description - The description.
      Returns:
      A new FormalParam.
      Throws:
      IllegalArgumentException - When name is not valid.
    • isValidName

      static boolean isValidName(String name)
      Returns true if a string is a valid name:
      • It cannot be null
      • It cannot be empty
      • It cannot contain any space or control character
      Parameters:
      name - The name.
      Returns:
      true if label is a valid label.