MCPcopy Create free account
hub / github.com/BruceEckel/OnJava8-Examples / setTitle

Method setTitle

reflection/Position.java:20–24  ·  view source on GitHub ↗
(String newTitle)

Source from the content-addressed store, hash-verified

18 }
19 public String getTitle() { return title; }
20 public void setTitle(String newTitle) {
21 // Throws EmptyTitleException if newTitle is null:
22 title = Optional.ofNullable(newTitle)
23 .orElseThrow(EmptyTitleException::new);
24 }
25 public Person getPerson() { return person; }
26 public void setPerson(Person newPerson) {
27 // Uses empty Person if newPerson is null:

Callers 2

PositionMethod · 0.95
BoxesMethod · 0.80

Calls 1

orElseThrowMethod · 0.80

Tested by

no test coverage detected