cast<X, Y> method

SharedData<X, Y> cast<X, Y>()

Casts to SharedData<X, Y>.

Implementation

SharedData<X, Y> cast<X, Y>() {
  if (this is SharedData<X, Y>) {
    return this as SharedData<X, Y>;
  } else {
    return SharedData<X, Y>(data as X);
  }
}