serialize<S> method

S serialize<S>()

Implementation

S serialize<S>() {
  if (this is Set<int>) {
    return this as S;
  } else if (this is Set<double>) {
    return this as S;
  } else if (this is Set<num>) {
    return this as S;
  } else if (this is Set<bool>) {
    return this as S;
  } else if (this is Set<String>) {
    return this as S;
  } else {
    return map((e) => SerializableData.serializeGeneric(e)).toSet() as S;
  }
}