public static class MediaRouter.RouteCategory
extends Object
| java.lang.Object | |
| ↳ | android.media.MediaRouter.RouteCategory |
一类路线的定义。 所有路线都属于一个类别。
Public methods |
|
|---|---|
CharSequence |
getName() |
CharSequence |
getName(Context context) 返回此RouteCategory的正确本地化/配置相关的名称。 |
List<MediaRouter.RouteInfo> |
getRoutes(List<MediaRouter.RouteInfo> out) 返回已添加到MediaRouter的此类别中的当前路由列表。 |
int |
getSupportedTypes() |
boolean |
isGroupable() 返回这个类别是否支持分组。 |
String |
toString() 返回对象的字符串表示形式。 |
Inherited methods |
|
|---|---|
java.lang.Object
|
|
CharSequence getName ()
| Returns | |
|---|---|
CharSequence |
the name of this route category |
CharSequence getName (Context context)
返回此RouteCategory的正确本地化/配置相关的名称。
| Parameters | |
|---|---|
context |
Context: Context to resolve name resources |
| Returns | |
|---|---|
CharSequence |
the name of this route category |
List<MediaRouter.RouteInfo> getRoutes (List<MediaRouter.RouteInfo> out)
返回已添加到MediaRouter的此类别中的当前路由列表。
此列表将不包括嵌套在RouteGroups中的路由。 RouteGroup在其类别中被视为单个路由。
| Parameters | |
|---|---|
out |
List: a List to fill with the routes in this category. If this parameter is non-null, it will be cleared, filled with the current routes with this category, and returned. If this parameter is null, a new List will be allocated to report the category's current routes. |
| Returns | |
|---|---|
List<MediaRouter.RouteInfo> |
A list with the routes in this category that have been added to the MediaRouter. |
int getSupportedTypes ()
| Returns | |
|---|---|
int |
Flag set describing the route types supported by this category |
boolean isGroupable ()
返回这个类别是否支持分组。
如果此方法返回true,则通过调用 getRouteAt(int)从此类别获得的所有路由将为 MediaRouter.RouteGroup 。
| Returns | |
|---|---|
boolean |
true if this category supports |
String toString ()
返回对象的字符串表示形式。 通常, toString方法返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。
类Object的toString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:
getClass().getName() + '@' + Integer.toHexString(hashCode())
| Returns | |
|---|---|
String |
a string representation of the object. |