public class Television extends Object implements Comparable<Television>
| Modifier and Type | Class and Description |
|---|---|
static class |
Television.DisplayType |
static class |
Television.TelevisionBrandChannelComparator |
static class |
Television.TelevisionChannelComparator |
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_CHANNEL |
static int |
MAX_VOLUME |
static int |
MIN_CHANNEL |
static int |
MIN_VOLUME |
| Constructor and Description |
|---|
Television() |
Television(String brand) |
Television(String brand,
int volume) |
Television(String brand,
int volume,
Television.DisplayType display) |
Television(String brand,
Television.DisplayType display) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeChannel(int channel) |
int |
compareTo(Television other) |
void |
disableParentalControl() |
void |
enableParentalControl() |
boolean |
equals(Object obj) |
String |
getBrand() |
int |
getCurrentChannel() |
Television.DisplayType |
getDisplay() |
int |
getVolume() |
int |
hashCode() |
boolean |
isParentalControlEnabled() |
void |
setBrand(String brand) |
void |
setDisplay(Television.DisplayType display) |
void |
setParentalControlEnabled(boolean parentalControl) |
void |
setVolume(int volume) |
String |
toString() |
public static final int MIN_VOLUME
public static final int MAX_VOLUME
public static final int MIN_CHANNEL
public static final int MAX_CHANNEL
public Television()
public Television(String brand)
public Television(String brand, int volume) throws IllegalArgumentException
IllegalArgumentExceptionpublic Television(String brand, Television.DisplayType display)
public Television(String brand, int volume, Television.DisplayType display) throws IllegalArgumentException
IllegalArgumentExceptionpublic String getBrand()
public void setBrand(String brand)
public int getVolume()
public void setVolume(int volume)
throws IllegalArgumentException
IllegalArgumentExceptionpublic int getCurrentChannel()
public void changeChannel(int channel)
throws InvalidChannelException,
ChannelDisallowedException
public Television.DisplayType getDisplay()
public void setDisplay(Television.DisplayType display)
public boolean isParentalControlEnabled()
public void setParentalControlEnabled(boolean parentalControl)
public void enableParentalControl()
public void disableParentalControl()
public int compareTo(Television other)
compareTo in interface Comparable<Television>