Search in sources :

Example 26 with StringData

use of net.sourceforge.processdash.data.StringData in project processdash by dtuma.

the class GlobEngine method asCollection.

private static Collection asCollection(SimpleData data) {
    if (!data.test())
        return null;
    if (data instanceof StringData)
        data = ((StringData) data).asList();
    if (data instanceof ListData) {
        Collection words = new HashSet();
        words.addAll(((ListData) data).asList());
        return words;
    } else
        return asCollection(data.format());
}
Also used : Collection(java.util.Collection) StringData(net.sourceforge.processdash.data.StringData) ListData(net.sourceforge.processdash.data.ListData) HashSet(java.util.HashSet)

Aggregations

StringData (net.sourceforge.processdash.data.StringData)26 ListData (net.sourceforge.processdash.data.ListData)15 SimpleData (net.sourceforge.processdash.data.SimpleData)13 ArrayList (java.util.ArrayList)3 List (java.util.List)3 DoubleData (net.sourceforge.processdash.data.DoubleData)3 ImmutableStringData (net.sourceforge.processdash.data.ImmutableStringData)3 MalformedValueException (net.sourceforge.processdash.data.MalformedValueException)3 SaveableData (net.sourceforge.processdash.data.SaveableData)3 EscapeString (net.sourceforge.processdash.util.EscapeString)3 HashMap (java.util.HashMap)2 Iterator (java.util.Iterator)2 LinkedList (java.util.LinkedList)2 Map (java.util.Map)2 DataRepository (net.sourceforge.processdash.data.repository.DataRepository)2 EVTaskListData (net.sourceforge.processdash.ev.EVTaskListData)2 LocalizedString (net.sourceforge.processdash.util.LocalizedString)2 NodeList (org.w3c.dom.NodeList)2 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1