Java Code Examples for org.osgl.util.S#join()

The following examples show how to use org.osgl.util.S#join() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Gh1145.java    From actframework with Apache License 2.0 6 votes vote down vote up
private String csvContent() {
    List<String> list = new ArrayList<>();
    for (int j = 0; j < 100; ++j) {
        list.add("key" + j);
    }
    String headline = S.join(",", list);
    List<String> dataLines = new ArrayList<>();
    dataLines.add(headline);
    for (Data data : this.list) {
        List<String> cell = new ArrayList<>();
        for (int j = 0; j < 100; ++j) {
            String key = "key" + j;
            cell.add((String) data.getValue(key));
        }
        dataLines.add(S.join(",", cell));
    }
    return S.join("\n", dataLines);
}
 
Example 2
Source File: Gh1145.java    From actframework with Apache License 2.0 5 votes vote down vote up
@GetAction
public List<Data> get(ActionContext context) {
    List<String> list = new ArrayList<>();
    for (int j = 0; j < 100; ++j) {
        list.add("key" + j);
    }
    String propSpec = S.join(",", list);
    PropertySpec.current.set(propSpec);
    return this.list;
}
 
Example 3
Source File: SenderMethodMetaInfo.java    From actframework with Apache License 2.0 5 votes vote down vote up
private String _params() {
    return S.join(", ", params.map(new $.Transformer<HandlerParamMetaInfo, String>() {
        @Override
        public String transform(HandlerParamMetaInfo paramMetaInfo) {
            return paramMetaInfo.type().getClassName();
        }
    }));
}
 
Example 4
Source File: OptionAnnoInfoBase.java    From actframework with Apache License 2.0 5 votes vote down vote up
public String leads() {
    if (null == lead1 && null == lead2) {
        return "";
    }
    if (null == lead1) {
        return lead2;
    } else if (null == lead2) {
        return lead1;
    }
    return S.join(",", lead1, lead2);
}
 
Example 5
Source File: FibonacciSeriesHolder.java    From java-di with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return S.join(",", series);
}
 
Example 6
Source File: EvenFibonacciSeriesHolder.java    From java-di with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return S.join(",", series);
}
 
Example 7
Source File: FibonacciSeriesHolder2.java    From java-di with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return S.join(",", C.listOf(series));
}
 
Example 8
Source File: FibonacciSeriesHolder3.java    From java-di with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return S.join(",", series);
}
 
Example 9
Source File: OddFibonacciSeriesHolder.java    From java-di with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    return S.join(",", C.listOf(series));
}
 
Example 10
Source File: CORS.java    From actframework with Apache License 2.0 4 votes vote down vote up
private Spec(Collection<H.Method> methodSet) {
    E.illegalArgumentIf(methodSet.isEmpty());
    methods = S.join(", ", C.list(methodSet).map($.F.<H.Method>asString()));
    effective = true;
}
 
Example 11
Source File: AppNameInferer.java    From actframework with Apache License 2.0 4 votes vote down vote up
private static String fromTokens(List<String> tokens) {
    List<String> filtered = NoisyWordsFilter.filter(tokens);
    String joined = S.join(".", filtered);
    return Keyword.of(joined).httpHeader();
}