当前位置: 首页>>代码示例>>Java>>正文


Java StringSeq类代码示例

本文整理汇总了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;
}
 
开发者ID:aguther,项目名称:dds-examples,代码行数:29,代码来源:DynamicPartitionObserver.java

示例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;
}
 
开发者ID:aguther,项目名称:dds-examples,代码行数:17,代码来源:DynamicPartitionObserverTest.java

示例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;
}
 
开发者ID:aguther,项目名称:dds-examples,代码行数:16,代码来源:DynamicPartitionObserverTest.java

示例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;
}
 
开发者ID:Prometheus-ETSIIT,项目名称:locaviewer,代码行数:17,代码来源:DiscoveryData.java

示例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))
    );
}
 
开发者ID:Prometheus-ETSIIT,项目名称:locaviewer,代码行数:23,代码来源:TopicoControl.java

示例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;
}
 
开发者ID:EdwardOst,项目名称:mdpnp,代码行数:12,代码来源:IceExampleRoutesTest.java

示例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;
}
 
开发者ID:Prometheus-ETSIIT,项目名称:locaviewer,代码行数:9,代码来源:DiscoveryData.java

示例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)));
}
 
开发者ID:Prometheus-ETSIIT,项目名称:locaviewer,代码行数:10,代码来源:LectorBase.java


注:本文中的com.rti.dds.infrastructure.StringSeq类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。