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


Java EChange.valueOf方法代码示例

本文整理汇总了Java中com.helger.commons.state.EChange.valueOf方法的典型用法代码示例。如果您正苦于以下问题:Java EChange.valueOf方法的具体用法?Java EChange.valueOf怎么用?Java EChange.valueOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.helger.commons.state.EChange的用法示例。


在下文中一共展示了EChange.valueOf方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeRelation

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
@Nonnull
public EChange removeRelation (@Nullable final IMutableGraphRelation aRelation)
{
  if (aRelation == null || m_aRelations == null)
    return EChange.UNCHANGED;
  return EChange.valueOf (m_aRelations.remove (aRelation.getID ()) != null);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:8,代码来源:GraphNode.java

示例2: registerEventTarget

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
@Nonnull
public EChange registerEventTarget (@Nonnull final EMicroEvent eEventType, @Nonnull final IMicroEventTarget aTarget)
{
  ValueEnforcer.notNull (eEventType, "EventType");
  ValueEnforcer.notNull (aTarget, "EventTarget");

  if (m_aEventTargets == null)
    m_aEventTargets = new CommonsEnumMap <> (EMicroEvent.class);
  final CallbackList <IMicroEventTarget> aSet = m_aEventTargets.computeIfAbsent (eEventType,
                                                                                 k -> new CallbackList <> ());
  return EChange.valueOf (aSet.add (aTarget));
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:13,代码来源:AbstractMicroNode.java

示例3: removeHeader

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
@Nonnull
public EChange removeHeader (@Nullable final String sName, @Nullable final String sValue)
{
  final String sUnifiedName = getUnifiedName (sName);
  final ICommonsList <String> aValues = m_aHeaders.get (sUnifiedName);
  final boolean bRemoved = aValues != null && aValues.remove (sValue);
  if (bRemoved && aValues.isEmpty ())
  {
    // If the last value was removed, remove the whole header
    m_aHeaders.remove (sUnifiedName);
  }

  return EChange.valueOf (bRemoved);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:15,代码来源:HttpHeaderMap.java

示例4: deleteItem

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
@Nonnull
default EChange deleteItem (@Nullable final String sID)
{
  return EChange.valueOf (sID != null && getAndRemoveEntry (x -> x.getID ().equals (sID)) != null);
}
 
开发者ID:phax,项目名称:peppol-directory,代码行数:6,代码来源:IReIndexWorkItemList.java

示例5: addExchangeRatio

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
@Nonnull
public EChange addExchangeRatio (@Nonnull final ExchangeRatio aExchangeRatio)
{
  ValueEnforcer.notNull (aExchangeRatio, "ExchangeRatio");
  return EChange.valueOf (m_aList.add (aExchangeRatio));
}
 
开发者ID:phax,项目名称:ph-masterdata,代码行数:7,代码来源:ExchangeRatioList.java

示例6: mergeWith

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
@Nonnull
public EChange mergeWith (@Nonnull final ExchangeRatioList aList)
{
  ValueEnforcer.notNull (aList, "List");
  return EChange.valueOf (m_aList.addAll (aList.m_aList));
}
 
开发者ID:phax,项目名称:ph-masterdata,代码行数:7,代码来源:ExchangeRatioList.java

示例7: putSingle

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
/**
 * Add a single value into the container identified by the passed key.
 *
 * @param aKey
 *        The key to use. May not be <code>null</code>.
 * @param aInnerKey
 *        The key for the inner map to use. May not be <code>null</code>.
 * @param aValue
 *        The value to be added. May be <code>null</code>.
 * @return {@link EChange}
 */
@Nonnull
default EChange putSingle (@Nonnull final KEYTYPE1 aKey,
                           @Nonnull final KEYTYPE2 aInnerKey,
                           @Nullable final VALUETYPE aValue)
{
  return EChange.valueOf (getOrCreate (aKey).put (aInnerKey, aValue) != null);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:19,代码来源:IMultiMapMapBased.java

示例8: removeObject

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
/**
 * Remove the object with the passed key from this map. <br>
 * Note: this method returns {@link EChange#UNCHANGED} even if removal was
 * successful if the value was <code>null</code>.
 *
 * @param aKey
 *        The key to be removed. May be <code>null</code>.
 * @return {@link EChange#CHANGED} if the removal was successful,
 *         {@link EChange#UNCHANGED} if removal fails.
 * @see #remove(Object)
 */
@Nonnull
default EChange removeObject (@Nullable final KEYTYPE aKey)
{
  return EChange.valueOf (remove (aKey) != null);
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:17,代码来源:ICommonsMap.java

示例9: addObject

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
/**
 * add the provided element to the collection using {@link #add(Object)} but
 * returning a more structured return value.
 *
 * @param aElement
 *        The element to be add. May be <code>null</code>.
 * @return {@link EChange#CHANGED} if the element was added successfully,
 *         {@link EChange#UNCHANGED} otherwise (e.g. because if is already
 *         contained).
 * @see #add(Object)
 */
@Nonnull
default EChange addObject (@Nullable final ELEMENTTYPE aElement)
{
  return EChange.valueOf (add (aElement));
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:17,代码来源:ICommonsCollection.java

示例10: removeObject

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
/**
 * Remove the provided element from the collection using
 * {@link #remove(Object)} but returning a more structured return value.
 *
 * @param aElement
 *        The element to be removed. May be <code>null</code>.
 * @return {@link EChange#CHANGED} if the element was removed successfully,
 *         {@link EChange#UNCHANGED} otherwise.
 * @see #remove(Object)
 */
@Nonnull
default EChange removeObject (@Nullable final ELEMENTTYPE aElement)
{
  return EChange.valueOf (remove (aElement));
}
 
开发者ID:phax,项目名称:ph-commons,代码行数:16,代码来源:ICommonsCollection.java

示例11: removeRules

import com.helger.commons.state.EChange; //导入方法依赖的package包/类
/**
 * Remove all rules matching the passed predicate.
 *
 * @param aFilter
 *        The predicate to apply for deletion. May not be <code>null</code>.
 * @return {@link EChange#CHANGED} it at least one rule was removed,
 *         {@link EChange#UNCHANGED} otherwise.
 * @since 5.0.0
 */
@Nonnull
public EChange removeRules (@Nonnull final Predicate <? super ICSSTopLevelRule> aFilter)
{
  return EChange.valueOf (m_aRules.removeIf (aFilter));
}
 
开发者ID:phax,项目名称:ph-css,代码行数:15,代码来源:AbstractHasTopLevelRules.java


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