Skip to content

Built-in join function#118

Merged
jrha merged 10 commits intoquattor:masterfrom
iliclaey:join-function
Dec 6, 2016
Merged

Built-in join function#118
jrha merged 10 commits intoquattor:masterfrom
iliclaey:join-function

Conversation

@iliclaey
Copy link
Contributor

@iliclaey iliclaey commented Jul 5, 2016

Also fixes #120

Description
-----------
This function takes a delimeter and a list of strings, or each of the strings
individually, and joins them with the given delimeter. Only strings can be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or list of strings. you probably mean Only (list of) strings can be ...

import org.quattor.pan.dml.functions.DebugSuppressed;
import org.quattor.pan.dml.functions.Delete;
import org.quattor.pan.dml.functions.*;
import org.quattor.pan.dml.functions.Deprecated;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you keep the Deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise Java doesn't know whether it should use org.quattor.pan.dml.functions.Deprecated or java.lang.Deprecated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the main reasons wildcard imports in Java are debated so much.

@stdweird
Copy link
Member

stdweird commented Jul 7, 2016

retest this please

@stdweird
Copy link
Member

retest this please

3 similar comments
@stdweird
Copy link
Member

retest this please

@stdweird
Copy link
Member

retest this please

@stdweird
Copy link
Member

retest this please

int length = ops.length;

for (int i = 1; i < length; i++) {
Element e = ops[i].execute(context);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do? It looks recursive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not recursive, it just loops over the arguments and executes them. The execution is needed to get the actual value when for example passing variables to the function.

@jrha jrha added this to the 10.4 milestone Nov 24, 2016
@jrha jrha merged commit 177e124 into quattor:master Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

require java 8

3 participants