public static class LineFollowerConfig.ColorPattern
extends java.lang.Object
implements java.lang.Cloneable
Color.RED, Color.GREEN, and Color.BLUE.| Constructor and Description |
|---|
ColorPattern()
Constructs an empty color pattern object.
|
ColorPattern(LineFollowerConfig.ColorPattern colorPattern)
Constructs a color pattern object to render a specified colorPattern.
|
ColorPattern(java.lang.Object... args)
Constructs a color pattern object to render a specified colorPattern.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the color sequence.
|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
org.json.JSONArray |
getJSONArray()
Get the color sequence by JSON array.
|
java.util.List<java.lang.Object> |
getList()
Get the color sequence by the list (List
|
int |
hashCode() |
RobotErrorCode |
set(java.lang.Object... args)
Set a color sequence.
|
public ColorPattern()
public ColorPattern(LineFollowerConfig.ColorPattern colorPattern)
colorPattern - public ColorPattern(java.lang.Object... args)
throws org.json.JSONException
args - Colors that used to construct a color pattern object.
Up to three colors in a combination are allowed:
Color.RED, Color.GREEN, and Color.BLUE.org.json.JSONExceptionLineFollowerConfig.Colorpublic void clear()
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic org.json.JSONArray getJSONArray()
public java.util.List<java.lang.Object> getList()
public int hashCode()
hashCode in class java.lang.Objectpublic RobotErrorCode set(java.lang.Object... args)
args - The combination of a color Pattern is made up of 1-3 colors:
Color.RED, Color.GREEN, and Color.BLUE.RobotErrorCode.NO_ERROR if set color
sequence successfully. Otherwise, it will return a certain error code