本文整理汇总了Java中com.helger.commons.string.StringHelper.getImplodedMapped方法的典型用法代码示例。如果您正苦于以下问题:Java StringHelper.getImplodedMapped方法的具体用法?Java StringHelper.getImplodedMapped怎么用?Java StringHelper.getImplodedMapped使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.helger.commons.string.StringHelper
的用法示例。
在下文中一共展示了StringHelper.getImplodedMapped方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMediaString
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
public String getMediaString (@Nonnull final String sSeparator)
{
ValueEnforcer.notNull (sSeparator, "Separator");
if (m_aMedia.isEmpty ())
return "";
return StringHelper.getImplodedMapped (sSeparator, m_aMedia, ECSSMedium::getName);
}
示例2: getAsCSSString
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
@Nonempty
public String getAsCSSString (@Nonnull final ICSSWriterSettings aSettings, @Nonnegative final int nIndentLevel)
{
aSettings.checkVersionRequirements (this);
return StringHelper.getImplodedMapped (m_aMembers, x -> x.getAsCSSString (aSettings, nIndentLevel));
}
示例3: _findAllRecursive
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
private static void _findAllRecursive (@Nonnull final Class <?> aStartClass,
@Nonnull final Class <?> aFindClass,
@Nonnull @Nonempty final String sXMLName,
@Nonnull final NonBlockingStack <StackElement> aStack,
@Nonnull final Set <Class <?>> aUniqueClasses)
{
// Avoid endless loop, if the same type is already part of the stack
if (aUniqueClasses.add (aStartClass))
{
aStack.push (new StackElement (aStartClass, sXMLName));
// Find per-class data
PerClassData aPerClassData = s_aClassCache.get (aStartClass);
if (aPerClassData == null)
{
aPerClassData = _createPerClassData (aStartClass, aFindClass);
s_aClassCache.put (aStartClass, aPerClassData);
}
// Recursive always, even if data is from cache
for (final PerClassData.MemberData aMemberData : aPerClassData.m_aMembers)
_findAllRecursive (aMemberData.m_aClass, aFindClass, aMemberData.m_sXMLName, aStack, aUniqueClasses);
if (aPerClassData.m_aMatches.isNotEmpty ())
{
// Found matching members
final String sPrefix = StringHelper.getImplodedMapped (aStack, x -> x.m_sXMLName);
if (false)
for (final Field aField : aPerClassData.m_aMatches)
System.out.println (++i + sPrefix + _getXMLName (aField));
}
aStack.pop ();
aUniqueClasses.remove (aStartClass);
}
}
示例4: _splitGetCopy
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
private PLElementWithSize _splitGetCopy (final float fElementWidth,
@Nonnull @Nonempty final List <TextAndWidthSpec> aLines,
final boolean bSplittableCopy,
@Nonnull final String sIDSuffix)
{
ValueEnforcer.notEmpty (aLines, "Lines");
// Create a copy to be independent!
final ICommonsList <TextAndWidthSpec> aLineCopy = new CommonsArrayList <> (aLines);
// Excluding padding/margin
final SizeSpec aSize = new SizeSpec (fElementWidth, getDisplayHeightOfLineCount (aLineCopy.size ()));
final String sTextContent = StringHelper.getImplodedMapped ('\n', aLineCopy, TextAndWidthSpec::getText);
final IMPLTYPE aNewText = internalCreateNewVertSplitObject (thisAsT ()).setID (getID () + sIDSuffix);
((AbstractPLText <?>) aNewText)._setText (sTextContent);
// Set this explicitly after setBasicDataFrom!
aNewText.setVertSplittable (bSplittableCopy);
// Set min width/max width from source
// Don't use the height, because on vertically split elements, the height is
// dynamic
aNewText.setMinWidth (getMinWidth ());
aNewText.setMaxWidth (getMaxWidth ());
aNewText.internalMarkAsPrepared (aSize);
aNewText.internalSetPreparedLines (aLineCopy);
aNewText.internalSetPreparedFontData (m_aLoadedFont, m_fTextHeight, m_fDescent);
return new PLElementWithSize (aNewText, aSize);
}
示例5: getDisplayText
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nullable
public String getDisplayText (@Nonnull final Locale aDisplayLocale)
{
return StringHelper.getImplodedMapped ('\n', m_aResults, x -> x.getDisplayText (aDisplayLocale));
}
示例6: _getDisplayName
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
private static String _getDisplayName (@Nonnull final OptionGroup aOptionGroup)
{
return "[" + StringHelper.getImplodedMapped (" | ", aOptionGroup, CmdLineParser::_getDisplayName) + "]";
}
示例7: getAsCSSString
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
public String getAsCSSString (@Nonnull final ICSSWriterSettings aSettings, @Nonnegative final int nIndentLevel)
{
return StringHelper.getImplodedMapped (m_aValues, x -> x.getAsCSSString (aSettings, nIndentLevel));
}
示例8: getAsCSSString
import com.helger.commons.string.StringHelper; //导入方法依赖的package包/类
@Nonnull
public String getAsCSSString (@Nonnull final ICSSWriterSettings aSettings, @Nonnegative final int nIndentLevel)
{
return StringHelper.getImplodedMapped (m_aMembers, x -> x.getAsCSSString (aSettings, nIndentLevel));
}