• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ICommonsOrderedMap类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.helger.commons.collection.impl.ICommonsOrderedMap的典型用法代码示例。如果您正苦于以下问题:Java ICommonsOrderedMap类的具体用法?Java ICommonsOrderedMap怎么用?Java ICommonsOrderedMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ICommonsOrderedMap类属于com.helger.commons.collection.impl包,在下文中一共展示了ICommonsOrderedMap类的35个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testMap

点赞 3

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Test
public void testMap ()
{
  final ICommonsMap <String, Object> aMap = new CommonsHashMap<> ();
  aMap.put ("foo", "bar");
  assertEquals ("{\"foo\":\"bar\"}", JsonConverter.convertToJson (aMap).getAsJsonString ());

  final ICommonsNavigableMap <String, Object> aTreeMap = new CommonsTreeMap<> ();
  aTreeMap.put ("foo", "bar");
  aTreeMap.put ("foo2", Integer.valueOf (5));
  assertEquals ("{\"foo\":\"bar\",\"foo2\":5}", JsonConverter.convertToJson (aTreeMap).getAsJsonString ());

  final ICommonsOrderedMap <String, Object> aLinkedMap = new CommonsLinkedHashMap<> ();
  aLinkedMap.put ("foo", "bar");
  aLinkedMap.put ("foo2", Integer.valueOf (5));
  assertEquals ("{\"foo\":\"bar\",\"foo2\":5}", JsonConverter.convertToJson (aLinkedMap).getAsJsonString ());
  assertEquals ("{foo:\"bar\",foo2:5}",
                JsonConverter.convertToJson (aLinkedMap)
                             .getAsJsonString (new JsonWriterSettings ().setQuoteNames (false)));
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:21,
代码来源:JsonWriterTest.java

示例2: testWriteAndReadMap

点赞 3

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Test
public void testWriteAndReadMap ()
{
  final ICommonsMap <String, Object> aMap = new CommonsHashMap<> ();
  aMap.put ("foo", "bar");
  _testWriteAndRead (aMap);

  final ICommonsNavigableMap <String, Object> aTreeMap = new CommonsTreeMap<> ();
  aTreeMap.put ("foo", "bar");
  aTreeMap.put ("foo2", Integer.valueOf (5));
  _testWriteAndRead (aTreeMap);

  final ICommonsOrderedMap <String, Object> aLinkedMap = new CommonsLinkedHashMap<> ();
  aLinkedMap.put ("foo", "bar");
  aLinkedMap.put ("foo2", Integer.valueOf (5));
  _testWriteAndRead (aLinkedMap);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:18,
代码来源:JsonWriterTest.java

示例3: testMap

点赞 3

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Test
public void testMap ()
{
  final ICommonsMap <String, Object> aMap = new CommonsHashMap <> ();
  aMap.put ("foo", "bar");
  aMap.put ("foo2", Integer.valueOf (5));
  assertTrue (JsonConverter.convertToJson (aMap) instanceof JsonObject);

  final ICommonsNavigableMap <String, Object> aTreeMap = new CommonsTreeMap <> ();
  aTreeMap.put ("foo", "bar");
  aTreeMap.put ("foo2", Integer.valueOf (5));
  assertTrue (JsonConverter.convertToJson (aTreeMap) instanceof JsonObject);

  final ICommonsOrderedMap <String, Object> aLinkedMap = new CommonsLinkedHashMap <> ();
  aLinkedMap.put ("foo", "bar");
  aLinkedMap.put ("foo2", Integer.valueOf (5));
  assertTrue (JsonConverter.convertToJson (aLinkedMap) instanceof JsonObject);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:19,
代码来源:JsonConverterTest.java

示例4: getSortedByKey

点赞 3

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
/**
 * Get a map sorted by its keys. The comparison order is defined by the passed
 * comparator object.
 *
 * @param <KEYTYPE>
 *        map key type
 * @param <VALUETYPE>
 *        map value type
 * @param aMap
 *        The map to sort. May not be <code>null</code>.
 * @param aKeyComparator
 *        The comparator to be used. May not be <code>null</code>.
 * @return the sorted map and never <code>null</code>.
 */
@Nonnull
@ReturnsMutableCopy
public static <KEYTYPE, VALUETYPE> ICommonsOrderedMap <KEYTYPE, VALUETYPE> getSortedByKey (@Nullable final Map <KEYTYPE, VALUETYPE> aMap,
                                                                                           @Nonnull final Comparator <? super KEYTYPE> aKeyComparator)
{
  ValueEnforcer.notNull (aKeyComparator, "KeyComparator");

  if (isEmpty (aMap))
    return newOrderedMap (0);

  // get sorted Map.Entry list by Entry.getValue ()
  final ICommonsList <Map.Entry <KEYTYPE, VALUETYPE>> aList = newList (aMap.entrySet ());
  aList.sort (Comparator.comparing (Map.Entry::getKey, aKeyComparator));
  return newOrderedMap (aList);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:30,
代码来源:CollectionHelper.java

示例5: getSortedByValue

点赞 3

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
/**
 * Get a map sorted by aIter's values. The comparison order is defined by the
 * passed comparator object.
 *
 * @param <KEYTYPE>
 *        map key type
 * @param <VALUETYPE>
 *        map value type
 * @param aMap
 *        The map to sort. May not be <code>null</code>.
 * @param aValueComparator
 *        The comparator to be used. May not be <code>null</code>.
 * @return the sorted map and never <code>null</code>.
 */
@Nonnull
@ReturnsMutableCopy
public static <KEYTYPE, VALUETYPE> ICommonsOrderedMap <KEYTYPE, VALUETYPE> getSortedByValue (@Nullable final Map <KEYTYPE, VALUETYPE> aMap,
                                                                                             @Nonnull final Comparator <? super VALUETYPE> aValueComparator)
{
  ValueEnforcer.notNull (aValueComparator, "ValueComparator");

  if (isEmpty (aMap))
    return newOrderedMap (0);

  // get sorted Map.Entry list by Entry.getValue ()
  final ICommonsList <Map.Entry <KEYTYPE, VALUETYPE>> aList = newList (aMap.entrySet ());
  aList.sort (Comparator.comparing (Map.Entry::getValue, aValueComparator));
  return newOrderedMap (aList);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:30,
代码来源:CollectionHelper.java

示例6: convertToNative

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
public PModeLegBusinessInformation convertToNative (final IMicroElement aElement)
{
  final String sService = aElement.getAttributeValue (ATTR_SERVICE);
  final String sAction = aElement.getAttributeValue (ATTR_ACTION);

  final ICommonsOrderedMap <String, PModeProperty> aProperties = new CommonsLinkedHashMap <> ();
  for (final IMicroElement aPropertyElement : aElement.getAllChildElements (ELEMENT_PROPERTIES))
  {
    final PModeProperty aProperty = MicroTypeConverter.convertToNative (aPropertyElement, PModeProperty.class);
    aProperties.put (aProperty.getName (), aProperty);
  }

  final ICommonsOrderedMap <String, PModePayloadProfile> aPayloadProfiles = new CommonsLinkedHashMap <> ();
  for (final IMicroElement aPayloadElement : aElement.getAllChildElements (ELEMENT_PAYLOAD_PROFILE))
  {
    final PModePayloadProfile aPayloadProfile = MicroTypeConverter.convertToNative (aPayloadElement,
                                                                                    PModePayloadProfile.class);
    aPayloadProfiles.put (aPayloadProfile.getName (), aPayloadProfile);
  }

  final Integer aPayloadProfileMaxKB = aElement.getAttributeValueWithConversion (ATTR_PAYLOAD_PROFILE_MAX_KB,
                                                                                 Integer.class);
  final String sMPCID = aElement.getAttributeValue (ATTR_MPCID);

  return new PModeLegBusinessInformation (sService,
                                          sAction,
                                          aProperties,
                                          aPayloadProfiles,
                                          aPayloadProfileMaxKB,
                                          sMPCID);
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:32,
代码来源:PModeLegBusinessInformationMicroTypeConverter.java

示例7: PModeLegBusinessInformation

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
public PModeLegBusinessInformation (@Nullable final String sService,
                                    @Nullable final String sAction,
                                    @Nullable final ICommonsOrderedMap <String, PModeProperty> aProperties,
                                    @Nullable final ICommonsOrderedMap <String, PModePayloadProfile> aPayloadProfiles,
                                    @Nullable final Integer nPayloadProfileMaxKB,
                                    @Nullable final String sMPCID)
{
  setService (sService);
  setAction (sAction);
  setAllProperties (aProperties);
  setAllPayloadProfiles (aPayloadProfiles);
  setPayloadProfileMaxKB (nPayloadProfileMaxKB);
  setMPCID (sMPCID);
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:15,
代码来源:PModeLegBusinessInformation.java

示例8: mapAttributeNodes

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
/**
 * @param aNode
 *        Start node. May not be <code>null</code>.
 * @param sNodeName
 *        The element name to be queried relative to the start node.
 * @param sNodeKeyName
 *        The attribute name of the key.
 * @param sNodeValueName
 *        The attribute name of the value.
 * @return The non-<code>null</code> {@link Map}. @ In case a node is missing
 *         a key or value attribute.
 */
@Nonnull
@ReturnsMutableCopy
public static ICommonsOrderedMap <String, String> mapAttributeNodes (@Nonnull final IMicroElement aNode,
                                                                     @Nonnull final String sNodeName,
                                                                     @Nonnull final String sNodeKeyName,
                                                                     @Nonnull final String sNodeValueName)
{
  ValueEnforcer.notNull (aNode, "Node");
  ValueEnforcer.notNull (sNodeName, "NodeName");
  ValueEnforcer.notNull (sNodeKeyName, "NodeKeyName");
  ValueEnforcer.notNull (sNodeValueName, "NodeValueName");

  final ICommonsOrderedMap <String, String> ret = new CommonsLinkedHashMap <> ();
  int nIndex = 0;
  for (final IMicroElement eChild : aNode.getAllChildElements (sNodeName))
  {
    final String sName = eChild.getAttributeValue (sNodeKeyName);
    if (sName == null)
      throw new IllegalStateException (sNodeName +
                                       "[" +
                                       nIndex +
                                       "] does not have key attribute '" +
                                       sNodeKeyName +
                                       "'");

    final String sValue = eChild.getAttributeValue (sNodeValueName);
    if (sValue == null)
      throw new IllegalStateException (sNodeName +
                                       "[" +
                                       nIndex +
                                       "] does not have value attribute '" +
                                       sNodeValueName +
                                       "'");

    ret.put (sName, sValue);
    ++nIndex;
  }
  return ret;
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:52,
代码来源:AS4XMLHelper.java

示例9: _generatePModePayloadProfile

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
private ICommonsOrderedMap <String, PModePayloadProfile> _generatePModePayloadProfile ()
{
  final PModePayloadProfile aPModePayloadProfile = new PModePayloadProfile ("name",
                                                                            new MimeType (EMimeContentType.EXAMPLE,
                                                                                          "example"),
                                                                            "xsdfilename",
                                                                            20001,
                                                                            EMandatory.MANDATORY);
  final ICommonsOrderedMap <String, PModePayloadProfile> aPModePayloadProfiles = new CommonsLinkedHashMap<> ();
  aPModePayloadProfiles.put (aPModePayloadProfile.getName (), aPModePayloadProfile);
  return aPModePayloadProfiles;
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:15,
代码来源:PModeMicroTypeConverterTest.java

示例10: _generatePModeProperties

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
private ICommonsOrderedMap <String, PModeProperty> _generatePModeProperties ()
{
  final PModeProperty aPModeProperty = new PModeProperty ("name",
                                                          "description",
                                                          PModeProperty.DATA_TYPE_STRING,
                                                          EMandatory.MANDATORY);
  final ICommonsOrderedMap <String, PModeProperty> aPModeProperties = new CommonsLinkedHashMap<> ();
  aPModeProperties.put (aPModeProperty.getName (), aPModeProperty);
  return aPModeProperties;
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:13,
代码来源:PModeMicroTypeConverterTest.java

示例11: getAllRelations

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, IMutableGraphRelation> getAllRelations ()
{
  final ICommonsOrderedMap <String, IMutableGraphRelation> ret = new CommonsLinkedHashMap <> ();
  for (final IMutableGraphNode aNode : m_aNodes.values ())
    aNode.forEachRelation (x -> ret.put (x.getID (), x));
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:10,
代码来源:Graph.java

示例12: getAllRelations

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, IMutableDirectedGraphRelation> getAllRelations ()
{
  final ICommonsOrderedMap <String, IMutableDirectedGraphRelation> ret = new CommonsLinkedHashMap <> ();
  for (final IMutableDirectedGraphNode aNode : m_aNodes.values ())
    aNode.forEachRelation (x -> ret.put (x.getID (), x));
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:10,
代码来源:DirectedGraph.java

示例13: getAllAttributesAsMap

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public static ICommonsOrderedMap <String, String> getAllAttributesAsMap (@Nullable final Element aSrcNode)
{
  final ICommonsOrderedMap <String, String> ret = new CommonsLinkedHashMap <> ();
  forAllAttributes (aSrcNode, (sName, sValue) -> ret.put (sName, sValue));
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:9,
代码来源:XMLHelper.java

示例14: getAllFunctions

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
/**
 * @return A mutable copy of all contained functions. Never <code>null</code>
 *         but maybe empty.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <XPathFunctionKey, XPathFunction> getAllFunctions ()
{
  return m_aMap.getClone ();
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:11,
代码来源:MapBasedXPathFunctionResolver.java

示例15: readFromPropertiesXML

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public static ICommonsOrderedMap <String, String> readFromPropertiesXML (@Nonnull @WillClose final InputStream aIS)
{
  final ICommonsOrderedMap <String, String> ret = new CommonsLinkedHashMap <> ();
  final IMicroDocument aDoc = MicroReader.readMicroXML (aIS);
  if (aDoc != null)
    for (final IMicroElement eChild : aDoc.getDocumentElement ().getAllChildElements ("entry"))
      ret.put (eChild.getAttributeValue ("key"), eChild.getTextContent ());
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:12,
代码来源:XMLResourceBundle.java

示例16: getAllQAttributes

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nullable
@ReturnsMutableCopy
public ICommonsOrderedMap <IMicroQName, String> getAllQAttributes ()
{
  if (hasNoAttributes ())
    return null;
  return new CommonsLinkedHashMap<> (m_aAttrs.values (),
                                     IMicroAttribute::getAttributeQName,
                                     IMicroAttribute::getAttributeValue);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:11,
代码来源:MicroElement.java

示例17: getClonedValues

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, IJson> getClonedValues ()
{
  final ICommonsOrderedMap <String, IJson> ret = new CommonsLinkedHashMap <> ();
  for (final Map.Entry <String, IJson> aEntry : m_aValues.entrySet ())
    ret.put (aEntry.getKey (), aEntry.getValue ().getClone ());
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:10,
代码来源:JsonObject.java

示例18: getGrouped

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
/**
 * @param aKeyExtractor
 *        the key extractor by which the result is grouped.
 * @return A map with all items mapped from a key to its occurrences.
 * @param <T>
 *        Return list key type
 */
@Nonnull
@ReturnsMutableCopy
default <T> ICommonsOrderedMap <T, ICommonsList <IError>> getGrouped (@Nonnull final Function <? super IError, T> aKeyExtractor)
{
  final ICommonsOrderedMap <T, ICommonsList <IError>> ret = new CommonsLinkedHashMap <> ();
  // create a list for each key, and add the respective entry
  forEach (x -> ret.computeIfAbsent (aKeyExtractor.apply (x), k -> new CommonsArrayList <> ()).add (x));
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:17,
代码来源:IErrorList.java

示例19: getAsMultiMap

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
/**
 * @return A new multi map (map from String to List of String) with all
 *         values. Order may be lost. Never <code>null</code>.
 */
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, ICommonsList <String>> getAsMultiMap ()
{
  final ICommonsOrderedMap <String, ICommonsList <String>> ret = new CommonsLinkedHashMap <> ();
  forEach (aParam -> ret.computeIfAbsent (aParam.getName (), x -> new CommonsArrayList <> ())
                        .add (aParam.getValue ()));
  return ret;
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:14,
代码来源:URLParameterList.java

示例20: getAllCharsets

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
/**
 * @return An immutable collection of all available charsets from the standard
 *         charset provider.
 */
@Nonnull
@ReturnsMutableCopy
public static ICommonsOrderedMap <String, Charset> getAllCharsets ()
{
  return new CommonsLinkedHashMap <> (s_aAllCharsets);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:11,
代码来源:CharsetHelper.java

示例21: run

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
public void run ()
{
  final ICommonsOrderedMap <String, String> aMap = new CommonsLinkedHashMap<> ();
  for (int i = 0; i < RSRC.length; ++i)
    aMap.put (RSRC[i], RDST[i]);

  String s = "";
  for (int i = 0; i < m_nRuns; i++)
    s = StringHelper.replaceMultiple (SRC, aMap);
  if (!s.equals (DST))
    throw new IllegalStateException (s);
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:13,
代码来源:BenchmarkStringMultiReplace.java

示例22: getAllLetsAsMap

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, String> getAllLetsAsMap ()
{
  final ICommonsOrderedMap <String, String> ret = new CommonsLinkedHashMap <> ();
  for (final IPSElement aElement : m_aContent)
    if (aElement instanceof PSLet)
    {
      final PSLet aLet = (PSLet) aElement;
      ret.put (aLet.getName (), aLet.getValue ());
    }
  return ret;
}
 

开发者ID:phax,
项目名称:ph-schematron,
代码行数:14,
代码来源:PSPhase.java

示例23: getAllLetsAsMap

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, String> getAllLetsAsMap ()
{
  final ICommonsOrderedMap <String, String> ret = new CommonsLinkedHashMap <> ();
  for (final PSLet aLet : m_aLets)
    ret.put (aLet.getName (), aLet.getValue ());
  return ret;
}
 

开发者ID:phax,
项目名称:ph-schematron,
代码行数:10,
代码来源:PSSchema.java

示例24: main

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@SuppressFBWarnings ("DMI_HARDCODED_ABSOLUTE_FILENAME")
public static void main (final String [] args)
{
  int nFilesOK = 0;
  int nFilesError = 0;
  final ICommonsOrderedMap <File, ParseException> aErrors = new CommonsLinkedHashMap<> ();
  final Wrapper <File> aCurrentFile = new Wrapper<> ();
  final ICSSParseExceptionCallback aHdl = ex -> aErrors.put (aCurrentFile.get (), ex);
  for (final File aFile : new FileSystemRecursiveIterator (new File ("/")).withFilter (IFileFilter.filenameEndsWith (".css")))
  {
    if (false)
      s_aLogger.info (aFile.getAbsolutePath ());
    aCurrentFile.set (aFile);
    final CascadingStyleSheet aCSS = CSSReader.readFromFile (aFile, StandardCharsets.UTF_8, ECSSVersion.CSS30, aHdl);
    if (aCSS == null)
    {
      nFilesError++;
      s_aLogger.warn ("  " + aFile.getAbsolutePath () + " failed!");
    }
    else
      nFilesOK++;
  }

  s_aLogger.info ("Done");
  for (final Map.Entry <File, ParseException> aEntry : aErrors.entrySet ())
    s_aLogger.info ("  " + aEntry.getKey ().getAbsolutePath () + ":\n" + aEntry.getValue ().getMessage () + "\n");
  s_aLogger.info ("OK: " + nFilesOK + "; Error: " + nFilesError);
}
 

开发者ID:phax,
项目名称:ph-css,
代码行数:29,
代码来源:MainReadAllCSSOnDisc.java

示例25: getAllProperties

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, PModeProperty> getAllProperties ()
{
  return m_aProperties.getClone ();
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:7,
代码来源:PModeLegBusinessInformation.java

示例26: setAllProperties

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
public final void setAllProperties (@Nullable final ICommonsOrderedMap <String, PModeProperty> aProperties)
{
  m_aProperties.setAll (aProperties);
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:5,
代码来源:PModeLegBusinessInformation.java

示例27: getAllPayloadProfiles

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, PModePayloadProfile> getAllPayloadProfiles ()
{
  return m_aPayloadProfiles.getClone ();
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:7,
代码来源:PModeLegBusinessInformation.java

示例28: setAllPayloadProfiles

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
public final void setAllPayloadProfiles (@Nullable final ICommonsOrderedMap <String, PModePayloadProfile> aPayloadProfiles)
{
  m_aPayloadProfiles.setAll (aPayloadProfiles);
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:5,
代码来源:PModeLegBusinessInformation.java

示例29: getAllElementProcessors

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <QName, ISOAPHeaderElementProcessor> getAllElementProcessors ()
{
  return m_aRWLock.readLocked ( () -> m_aMap.getClone ());
}
 

开发者ID:phax,
项目名称:ph-as4,
代码行数:7,
代码来源:SOAPHeaderElementProcessorRegistry.java

示例30: getAllNodes

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, NODETYPE> getAllNodes ()
{
  return m_aNodes.getClone ();
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:7,
代码来源:AbstractBaseGraph.java

示例31: getPrefixToNamespaceURIMap

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, String> getPrefixToNamespaceURIMap ()
{
  return m_aPrefix2NS.getClone ();
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:7,
代码来源:MapBasedNamespaceContext.java

示例32: getAll

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, IJson> getAll ()
{
  return m_aValues.getClone ();
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:7,
代码来源:JsonObject.java

示例33: getAllHeaders

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, ICommonsList <String>> getAllHeaders ()
{
  return m_aHeaders.getClone ();
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:7,
代码来源:HttpHeaderMap.java

示例34: testConvertIntoEachOther

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Test
public void testConvertIntoEachOther ()
{
  final ICommonsOrderedMap <Class <?>, Object> aValues = new CommonsLinkedHashMap <> ();
  aValues.put (Date.class, new Date ());
  aValues.put (Calendar.class, PDTFactory.createCalendar ());
  aValues.put (GregorianCalendar.class, PDTFactory.createGregorianCalendar ());
  aValues.put (ZonedDateTime.class, PDTFactory.getCurrentZonedDateTime ());
  aValues.put (OffsetDateTime.class, PDTFactory.getCurrentOffsetDateTime ());
  aValues.put (LocalDateTime.class, PDTFactory.getCurrentLocalDateTime ());
  aValues.put (LocalDate.class, PDTFactory.getCurrentLocalDate ());
  aValues.put (LocalTime.class, PDTFactory.getCurrentLocalTime ());
  aValues.put (YearMonth.class, PDTFactory.getCurrentYearMonth ());
  aValues.put (Year.class, PDTFactory.getCurrentYearObj ());
  aValues.put (Instant.class, PDTFactory.getCurrentInstant ());

  for (final Map.Entry <Class <?>, Object> aSrc : aValues.entrySet ())
  {
    // Convert to String and back
    final String s = TypeConverter.convert (aSrc.getValue (), String.class);
    assertNotNull (s);
    final Object aSrcValue2 = TypeConverter.convert (s, aSrc.getKey ());
    assertNotNull (aSrcValue2);
    assertEquals ("Difference after reading from: " + s, aSrc.getValue (), aSrcValue2);

    // COnvert to any other type
    for (final Class <?> aDst : aValues.keySet ())
      if (aSrc.getKey () != aDst)
      {
        final boolean bIsTime = aSrc.getKey () == LocalTime.class || aDst == LocalTime.class;
        if (bIsTime &&
            (aSrc.getKey () == LocalDate.class ||
             aDst == LocalDate.class ||
             aSrc.getKey () == YearMonth.class ||
             aDst == YearMonth.class ||
             aSrc.getKey () == Year.class ||
             aDst == Year.class))
        {
          // Not convertible
        }
        else
        {
          if (s_aLogger.isDebugEnabled ())
            s_aLogger.debug ("Converting from " + aSrc.getKey ().getName () + " to " + aDst.getName ());
          final Object aDstValue = TypeConverter.convert (aSrc.getValue (), aDst);
          assertNotNull (aDstValue);
        }
      }
  }
}
 

开发者ID:phax,
项目名称:ph-commons,
代码行数:51,
代码来源:DateTimeTypeConverterRegistrarTest.java

示例35: getParameters

点赞 2

import com.helger.commons.collection.impl.ICommonsOrderedMap; //导入依赖的package包/类
@Nonnull
@ReturnsMutableCopy
public ICommonsOrderedMap <String, ?> getParameters ()
{
  return new CommonsLinkedHashMap <> (m_aCustomParameters);
}
 

开发者ID:phax,
项目名称:ph-schematron,
代码行数:7,
代码来源:SCHTransformerCustomizer.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)