// 根据频道名称获取频道type字段 public static String getChannelType(String s) { String type = null; for (Channel channel : allChannel) { if (s.equals(channel.getName())) { type = channel.getType(); return type; } } return type; }