Docsy / docs

JAVA · JAVADOC

Java · Javadoc

Real Javadoc HTML output from the checked-in java fixture source. Generated artifacts, commands, versions, and SHA-256 hashes are recorded under sources/native. This is a teaching library, not a published SDK.

12 symbols5 categoriesjava

Enums

Supported greeting moods.

Values

FRIENDLYFORMAL

Properties

property

FORMAL

A professional tone.

Returns

Greeter.Mood
property

FRIENDLY

A relaxed tone.

Returns

Greeter.Mood
property

prefix

Greeting prefix used for future calls.

Returns

String

Methods

method

greet

Greet a reader.

Parameters

nameString

Returns

String

A friendly greeting. new Greeter().greet("Ada");

Reject an empty reader name.

Errors

IllegalArgumentException

IllegalArgumentException - When name is empty.

Parameters

nameString

Returns

String

A validated greeting.

method

greetMany

Greet several readers in order. new Greeter().greetMany(new String[]{"Ada", "Linus"});

Parameters

namesString[]

Returns

String[]

Greetings in the same order.

method

hello

Legacy greeting alias.

Deprecated. Use greet(String) .

Parameters

nameString

Returns

String

A greeting.

method

valueOf

Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Errors

IllegalArgumentException

IllegalArgumentException - if this enum class has no constant with the specified name

Parameters

nameString

Returns

Greeter.Mood

the enum constant with the specified name

method

values

Returns an array containing the constants of this enum class, in the order they are declared.

Returns

Greeter.Mood[]

an array containing the constants of this enum class, in the order they are declared

Classes

class

Greeter

Build personalized greetings without network access. Greeter greeter = new Greeter(); System.out.println(greeter.greet("Docsy"));

Constructors

constructor

Greeter

—