public class TrafficLight extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TrafficLight.Builder
Builder to make traffic light construction easier.
|
Constructor and Description |
---|
TrafficLight()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addState(TrafficLightState state)
Adds a state to the traffic light.
|
static TrafficLight.Builder |
builder()
Returns a builder for the traffic light.
|
String |
getId()
Returns the id of the traffic light.
|
List<TrafficLightState> |
getStates()
Returns the states of the traffic light.
|
String |
getSubtitle()
Returns the subtitle of the traffic light.
|
String |
getTitle()
Returns the title of the traffic light.
|
void |
setId(String id)
Sets the id of the traffic light.
|
void |
setStates(List<TrafficLightState> states)
Sets the states of the traffic light.
|
void |
setSubtitle(String subtitle)
Sets the subtitle of the traffic light.
|
void |
setTitle(String title)
Sets the title of the traffic light.
|
String |
toString()
Returns a string representation of the object.
|
public void setId(String id)
id
- The id of the traffic lightpublic String getId()
public void setTitle(String title)
title
- The title of the traffic lightpublic String getTitle()
public void setSubtitle(String subtitle)
subtitle
- The subtitle of the traffic lightpublic String getSubtitle()
public void setStates(List<TrafficLightState> states)
states
- The states of the traffic lightpublic void addState(TrafficLightState state)
state
- The state to add to the traffic lightpublic List<TrafficLightState> getStates()
public String toString()
public static TrafficLight.Builder builder()
Copyright © 2018. All rights reserved.