本文整理汇总了Java中com.rti.dds.infrastructure.StringSeq类的典型用法代码示例。如果您正苦于以下问题:Java StringSeq类的具体用法?Java StringSeq怎么用?Java StringSeq使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringSeq类属于com.rti.dds.infrastructure包,在下文中一共展示了StringSeq类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertPartitionsToList
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
/**
* Convert the sequence with partitions into a list with partitions.
* In case the sequence is empty, add the default partition which equals to ''.
*
* @param stringSeq String sequence with partitions
* @return List of partitions
*/
private List<String> convertPartitionsToList(
StringSeq stringSeq
) {
// check argument
checkNotNull(stringSeq, "String sequence must not be null!");
// create list with partitions
List<String> list = new ArrayList<>(stringSeq.size());
// when partition is empty add default partition, otherwise copy items
if (stringSeq.isEmpty()) {
list.add(DEFAULT_PARTITION);
} else {
for (Object item : stringSeq) {
list.add((String) item);
}
}
// return result
return list;
}
示例2: createSubscriptionBuiltinTopicData
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
private SubscriptionBuiltinTopicData createSubscriptionBuiltinTopicData(
String topic,
String type,
String... partitions
) {
SubscriptionBuiltinTopicData builtinTopicData = mock(SubscriptionBuiltinTopicData.class);
PartitionQosPolicy partitionQosPolicy = mock(PartitionQosPolicy.class);
Whitebox.setInternalState(builtinTopicData, "partition", partitionQosPolicy);
Whitebox.setInternalState(partitionQosPolicy, "name", new StringSeq());
builtinTopicData.topic_name = topic;
builtinTopicData.type_name = type;
builtinTopicData.partition.name.addAll(Arrays.asList(partitions));
return builtinTopicData;
}
示例3: createPublicationBuiltinTopicData
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
private PublicationBuiltinTopicData createPublicationBuiltinTopicData(
String topic,
String type,
String... partitions
) {
PublicationBuiltinTopicData builtinTopicData = mock(PublicationBuiltinTopicData.class);
PartitionQosPolicy partitionQosPolicy = mock(PartitionQosPolicy.class);
Whitebox.setInternalState(builtinTopicData, "partition", partitionQosPolicy);
Whitebox.setInternalState(partitionQosPolicy, "name", new StringSeq());
builtinTopicData.topic_name = topic;
builtinTopicData.type_name = type;
builtinTopicData.partition.name.addAll(Arrays.asList(partitions));
return builtinTopicData;
}
示例4: DiscoveryData
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
/**
* Crea una nueva instancia con datos de una entidad descubierta.
*
* @param topicName Nombre del tópico en el que está.
* @param userData Metadatos compartidos.
* @param filterParams Parámetros del filtro.
* @param handle Handler para encontrarlo cuando se elimine.
*/
public DiscoveryData(String topicName, ByteSeq userData,
StringSeq filterParams, InstanceHandle_t handle) {
this.topicName = topicName.toString();
this.userData = new ByteSeq(userData.toArrayByte(null));
this.handle = new InstanceHandle_t(handle);
this.filterParams = (filterParams != null) ?
(StringSeq)filterParams.clone() : null;
}
示例5: createCFT
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
/**
* Crea un ContentFilteredTopic a partir del tópico actual.
*
* @param name Nombre del nuevo TopicDescription.
* @param expr Expresión de filtrado.
* @param params Parámetros de la expresión de filtrado.
* @return Nuevo tópico con filtro.
*/
public ContentFilteredTopic createCFT(final String name, final String expr,
final String[] params) {
ContentFilteredTopic topic = (ContentFilteredTopic)this.participante
.getParticipante().lookup_topicdescription(name);
if (topic != null)
return topic;
return this.participante.getParticipante().create_contentfilteredtopic(
name,
this.getTopicDescription(),
expr,
new StringSeq(Arrays.asList(params))
);
}
示例6: createDeviceConnectivity
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
private DeviceConnectivity createDeviceConnectivity() {
DeviceConnectivity message = (DeviceConnectivity) DeviceConnectivity.create();
message.unique_device_identifier = "oPXRmr243lAgud9qXeZ98q9Q6YqmRrGrEVXJ";
message.info = "";
message.state = ConnectionState.Disconnected;
message.type = ConnectionType.Simulated;
ValidTargets validTargets = (ValidTargets) ValidTargets.create();
validTargets.userData = new StringSeq(Arrays.asList("userData"));
message.valid_targets = validTargets;
return message;
}
示例7: getFilterParams
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
/**
* Obtiene los parámetros del CFT.
*
* @return Parámetros del filtro.
*/
public StringSeq getFilterParams() {
return filterParams;
}
示例8: cambioParametros
import com.rti.dds.infrastructure.StringSeq; //导入依赖的package包/类
/**
* Cambia los parámetros de la expresión de filtro del lector.
*
* @param params Nuevos parámetros.
*/
public final void cambioParametros(final String[] params) {
// Cambia los parámetros del tópico
this.topico.set_expression_parameters(new StringSeq(Arrays.asList(params)));
}