本文整理汇总了Java中com.google.gwt.thirdparty.guava.common.base.Objects.equal方法的典型用法代码示例。如果您正苦于以下问题:Java Objects.equal方法的具体用法?Java Objects.equal怎么用?Java Objects.equal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.thirdparty.guava.common.base.Objects
的用法示例。
在下文中一共展示了Objects.equal方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: build
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
public static ProductSupply build(final BPartner bpartner, final Product product, final ContractLine contractLine, final Date day)
{
//
// Validate
if (contractLine != null)
{
final BPartner contractBPartner = contractLine.getContract().getBpartner();
if (!Objects.equal(bpartner, contractBPartner))
{
throw new IllegalArgumentException("BPartner not matching the contract");
}
final Product contractProduct = contractLine.getProduct();
if (!Objects.equal(product, contractProduct))
{
throw new IllegalArgumentException("Product not matching the contract");
}
}
final ProductSupply productSupply = new ProductSupply();
productSupply.setBpartner(bpartner);
productSupply.setProduct(product);
productSupply.setContractLine(contractLine);
productSupply.setDay(DateUtils.truncToDay(day));
return productSupply;
}
示例2: equals
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
@Override
public final boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
if (obj == null)
{
return false;
}
if (getClass() != obj.getClass())
{
return false;
}
final AbstractEntity other = (AbstractEntity)obj;
return Objects.equal(id, other.id);
}
示例3: updateUI_NextWeekTrand
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
private final void updateUI_NextWeekTrand()
{
final WeekProductQtyReport weekQtyReport = weekQtyReportItem == null ? null : weekQtyReportItem.getBean();
final Trend nextWeekTrend = weekQtyReport == null ? null : weekQtyReport.getNextWeekTrend();
for (Map.Entry<Trend, Button> e : trend2button.entrySet())
{
final Trend trend = e.getKey();
final Button button = e.getValue();
if (Objects.equal(nextWeekTrend, trend))
{
button.addStyleName(STYLE_CurrentTrend);
}
else
{
button.removeStyleName(STYLE_CurrentTrend);
}
}
}
示例4: setDate
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
public void setDate(final Date date)
{
Preconditions.checkNotNull(date, "date");
final Date dateOld = _date;
final Date dateNew = dateHandler.normalize(date);
if (Objects.equal(dateOld, dateNew))
{
return;
}
_date = dateNew;
updateUI();
//
pcs.firePropertyChange(PROPERTY_Date, dateOld, dateNew);
}
示例5: setContainerDataSource
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
public final void setContainerDataSource(final BeanItemContainer<BT> containerNew)
{
if (Objects.equal(this.container, containerNew))
{
return;
}
if (this.container != null)
{
this.container.removeItemSetChangeListener(listener);
}
this.container = containerNew;
if (this.container != null)
{
this.container.addItemSetChangeListener(listener);
}
updateAll();
}
示例6: setWeekQtyReport
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
public void setWeekQtyReport(final BeanItem<WeekProductQtyReport> weekQtyReportItem)
{
if (Objects.equal(this.weekQtyReportItem, weekQtyReportItem))
{
return;
}
this.weekQtyReportItem = weekQtyReportItem;
final WeekProductQtyReport weekQtyReport = weekQtyReportItem == null ? null : weekQtyReportItem.getBean();
//
// Header caption
{
final String caption = weekQtyReport == null ? null : weekQtyReport.getCaption();
setCaption(caption);
}
//
// Product buttons
final ProductQtyReportContainer dailyQtyReportContainer = weekQtyReport == null ? null : weekQtyReport.getDailyQtyReportContainer();
productButtons.setContainerDataSource(dailyQtyReportContainer);
//
// Toolbar caption and trend buttons
{
final String nextWeek = weekQtyReport == null ? "-" : weekQtyReport.getNextWeekString();
toolbar.setCaption(i18n.get("WeeklyDetailedReportingView.toolbar.caption", nextWeek));
updateUI_NextWeekTrand();
}
}
示例7: getRfqHeaderByUuid
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
private RfqHeader getRfqHeaderByUuid(final String rfq_uuid)
{
for (final RfqHeader rfqHeader : getAllItemIds())
{
if (Objects.equal(rfq_uuid, rfqHeader.getRfq_uuid()))
{
return rfqHeader;
}
}
return null;
}
示例8: setAutoSortByPropertyId
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
public void setAutoSortByPropertyId(final Object autoSortPropertyId)
{
Preconditions.checkNotNull(autoSortPropertyId);
if (Objects.equal(this.autoSortPropertyId, autoSortPropertyId))
{
return;
}
this.autoSortPropertyId = autoSortPropertyId;
sort();
}
示例9: setDateHandler
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
public void setDateHandler(final DateNavigationHandler dateHandler)
{
if (Objects.equal(this.dateHandler, dateHandler))
{
return;
}
Preconditions.checkNotNull(dateHandler);
this.dateHandler = dateHandler;
updateUI();
}
示例10: setDateRange
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
public void setDateRange(final DateRange dateRange)
{
if (Objects.equal(dateHandler, dateRange))
{
return;
}
this.dateRange = dateRange;
updateUI();
}
示例11: importPlannedProductSupply
import com.google.gwt.thirdparty.guava.common.base.Objects; //导入方法依赖的package包/类
private void importPlannedProductSupply(final SyncProductSupply syncProductSupply, final BPartner bpartner)
{
final String product_uuid = syncProductSupply.getProduct_uuid();
final Product product = productRepo.findByUuid(product_uuid);
//
final String contractLine_uuid = syncProductSupply.getContractLine_uuid();
final ContractLine contractLine = contractLineRepo.findByUuid(contractLine_uuid);
//
final Date day = DateUtils.truncToDay(syncProductSupply.getDay());
final BigDecimal qty = Objects.firstNonNull(syncProductSupply.getQty(), BigDecimal.ZERO);
ProductSupply productSupply = productSupplyRepo.findByProductAndBpartnerAndDay(product, bpartner, day);
final boolean isNew;
if (productSupply == null)
{
isNew = true;
productSupply = ProductSupply.build(bpartner, product, contractLine, day);
}
else
{
isNew = false;
}
//
// Contract line
if(!isNew)
{
final ContractLine contractLineOld = productSupply.getContractLine();
if (!Objects.equal(contractLine, contractLineOld))
{
logger.warn("Changing contract line {}->{} for {} because of planning supply: {}", contractLineOld, contractLine, productSupply, syncProductSupply);
}
productSupply.setContractLine(contractLine);
}
//
// Quantity
if(!isNew)
{
final BigDecimal qtyOld = productSupply.getQty();
if (qty.compareTo(qtyOld) != 0)
{
logger.warn("Changing quantity {}->{} for {} because of planning supply: {}", qtyOld, qty, productSupply, syncProductSupply);
}
}
productSupply.setQty(qty);
//
// Save the product supply
productSupplyRepo.save(productSupply);
applicationEventBus.post(ProductSupplyChangedEvent.of(productSupply));
}