private static String toRegEx ( final Collection<String> parts ) { return StringHelper.join ( parts, ".*", new Apply<String> () { //$NON-NLS-1$ @Override public String apply ( final String parameter ) { return Pattern.quote ( parameter ); } } ); } }
private static String toRegEx ( final Collection<String> parts ) { return StringHelper.join ( parts, ".*", new Apply<String> () { //$NON-NLS-1$ @Override public String apply ( final String parameter ) { return Pattern.quote ( parameter ); } } ); } }
protected String getPath () { return StringHelper.join ( this.path, "/" ); } }
private String makePath () { if ( this.subtargets == null || this.subtargets.isEmpty () ) { return null; } return "/" + StringHelper.join ( this.subtargets, "/" ); }
@Override public String toString () { return String.format ( "[%s, %s]", this.id, StringHelper.join ( this.ioDirection, ", " ) ); }
private String makePath () { if ( this.subtargets == null || this.subtargets.isEmpty () ) { return null; } return "/" + StringHelper.join ( this.subtargets, "/" ); }
public NoSuchFolderException ( final String[] path ) { super ( StatusCodes.NO_SUCH_FOLDER, String.format ( "No such folder (%s)", StringHelper.join ( path, "/" ) ) ); } }
public NoSuchFolderException ( final String[] path ) { super ( StatusCodes.NO_SUCH_FOLDER, String.format ( "No such folder (%s)", StringHelper.join ( path, "/" ) ) ); } }
private String makePreDependencies ( final Collection<String> dependencies ) { final Set<String> result = new TreeSet<> ( dependencies ); result.add ( "org.eclipse.scada" ); //$NON-NLS-1$ return StringHelper.join ( result, ", " ); //$NON-NLS-1$ }
private String makePreDependencies ( final Collection<String> dependencies ) { final Set<String> result = new TreeSet<> ( dependencies ); result.add ( "org.eclipse.scada" ); //$NON-NLS-1$ return StringHelper.join ( result, ", " ); //$NON-NLS-1$ }
protected static <E extends Enum<E>> String makeEnumError ( final Class<E> enumType, final String stringValue ) { return String.format ( "Value '%s' is not contained in enum. (Possible values: %s)", stringValue, StringHelper.join ( enumType.getEnumConstants (), ", " ) ); }
@Override protected void injectRequestAttributes ( final Map<String, String> request ) { super.injectRequestAttributes ( request ); int i = 0; for ( final List<PasswordEncoding> group : this.requestedTypes ) { request.put ( REQUESTED_TYPES_PREFIX + i, StringHelper.join ( group, ", " ) ); i++; } }
private void addProxySource ( final String id, final Collection<String> sources ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "sources", StringHelper.join ( sources, ", " ) ); addData ( Factories.FACTORY_DA_PROXY_SOURCE, id, data ); }
private Element createTarget ( final Element project, final String name, final List<String> depends ) { final Element ele = createElement ( project, "target" ); //$NON-NLS-1$ ele.setAttribute ( "name", name ); //$NON-NLS-1$ if ( !depends.isEmpty () ) { ele.setAttribute ( "depends", StringHelper.join ( depends, "," ) ); //$NON-NLS-1$ //$NON-NLS-2$ } ele.setAttribute ( "unless", "skip." + name ); //$NON-NLS-1$ //$NON-NLS-2$ return ele; }
@Override protected void injectRequestAttributes ( final Map<String, String> request ) { super.injectRequestAttributes ( request ); int i = 0; for ( final List<PasswordEncoding> group : this.requestedTypes ) { request.put ( REQUESTED_TYPES_PREFIX + i, StringHelper.join ( group, ", " ) ); i++; } }
private Element createTarget ( final Element project, final String name, final List<String> depends ) { final Element ele = createElement ( project, "target" ); //$NON-NLS-1$ ele.setAttribute ( "name", name ); //$NON-NLS-1$ if ( !depends.isEmpty () ) { ele.setAttribute ( "depends", StringHelper.join ( depends, "," ) ); //$NON-NLS-1$ //$NON-NLS-2$ } ele.setAttribute ( "unless", "skip." + name ); //$NON-NLS-1$ //$NON-NLS-2$ return ele; }
private void addProxySource ( final String id, final Collection<String> sources ) { final Map<String, String> data = new HashMap<String, String> (); data.put ( "sources", StringHelper.join ( sources, ", " ) ); addData ( Factories.FACTORY_DA_PROXY_SOURCE, id, data ); }
public static String makeFullQualified ( final Component component, final String... local ) { final List<String> hier = Components.makeHierarchy ( component ); if ( component instanceof NamedDocumentable ) { hier.add ( Names.makeName ( (NamedDocumentable)component ) ); } hier.addAll ( Arrays.asList ( local ) ); return StringHelper.join ( hier, delimiter ); }
public static String makeFullQualified ( final Component component, final String... local ) { final List<String> hier = Components.makeHierarchy ( component ); if ( component instanceof NamedDocumentable ) { hier.add ( Names.makeName ( (NamedDocumentable)component ) ); } hier.addAll ( Arrays.asList ( local ) ); return StringHelper.join ( hier, delimiter ); }
public void start ( final Map<String, Object> context, final Builder builder ) { this.contextSet = getContextSet ( context, this.contextAttribute ); if ( this.debug ) { builder.setAttribute ( this.prefix + ".before", Variant.valueOf ( StringHelper.join ( this.contextSet, "," ) ) ); } this.matches = 0; }