Class FlexibleConstructorBodiesExamples.Account

java.lang.Object
net.jrodolfo.java_evolution.java25.FlexibleConstructorBodiesExamples.Account
Enclosing class:
FlexibleConstructorBodiesExamples

public static class FlexibleConstructorBodiesExamples.Account extends Object
Simple account model used to demonstrate validation before constructor delegation.
  • Constructor Details

    • Account

      public Account(String owner)
      Creates an active account after validating and normalizing the owner.
      Parameters:
      owner - account owner
  • Method Details

    • owner

      public String owner()
      Returns the normalized account owner.
      Returns:
      owner name
    • active

      public boolean active()
      Returns whether the account is active.
      Returns:
      active flag