org.springframework.data.gemfire.examples.domain.Address.getStreet()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中org.springframework.data.gemfire.examples.domain.Address.getStreet()方法的一些代码示例,展示了Address.getStreet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.getStreet()方法的具体详情如下:
包路径:org.springframework.data.gemfire.examples.domain.Address
类名称:Address
方法名:getStreet

Address.getStreet介绍

[英]Returns the street.
[中]返回街道。

代码示例

代码示例来源:origin: spring-projects/spring-gemfire-examples

@Override
  public String toString() {
    return String.format("%1$s, %2$s - %3$s", getStreet(), getCity(), getCountry());
  }
}

代码示例来源:origin: spring-projects/spring-gemfire-examples

private void findOrders() {
  log.debug("looking for orders for customer ID 2");
  
  for (Order order: orderService.findOrdersByCustomerId(2L)) {
    log.debug("found order ID " + order.getId() + " " + 
        order.getBillingAddress().getStreet() + " " + 
        order.getBillingAddress().getCity() + " " + 
        order.getBillingAddress().getCountry());
      for (LineItem lineItem: order.getLineItems()) {
        log.debug("product ID:" + lineItem.getProductId() + 
           " quantity:" + lineItem.getAmount() + 
           " unit price:" + lineItem.getUnitPrice().setScale(2,BigDecimal.ROUND_DOWN) + 
           " total price:" + lineItem.getTotal().setScale(2,BigDecimal.ROUND_DOWN));
      }
  }
}

相关文章