copy method

T copy()

Implementation

T copy() {
  return getFactory().fromJson(getFactory().toJson(this as T));
}