Interface Self<T>

Type Parameters:
T - The instance type of this.

public interface Self<T>
Interface for stream lining self returning with inherited classes, without complex generics.
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    Get this casted to type T.
  • Method Details

    • self

      default T self()
      Get this casted to type T. Will throw a ClassCastException if this is not an instance of type T.
      Returns:
      The instance.
      Throws:
      ClassCastException - If this is not an instance of type T.