Skip to content

Commit

Permalink
Added missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
sheinbergon committed Dec 16, 2022
1 parent f8adb2e commit 95bcc5c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,23 @@ abstract class GeometryAccessorFunSpec<F : SimpleFunction, O : ValueHolder> : Fu
is NullableFloat8Holder -> this.valueIsSetTo(value as Double)
is Float8Holder -> this.valueIsSetTo(value as Double)
is NullableIntHolder -> this.valueIsSetTo(value as Int)
is NullableBitHolder -> this.valueIsSetTo(value as Boolean)
is IntHolder -> this.valueIsSetTo(value as Int)
is BitHolder -> this.valueIsSetTo(value as Boolean)
else -> throw IllegalArgumentException("Unsupported value holder type '${this::class.simpleName}'")
}

private fun O.isNotSet() = when(this) {
is NullableFloat8Holder -> this.valueIsNotSet()
is NullableBitHolder -> this.valueIsNotSet()
else -> throw IllegalArgumentException("Unsupported value holder type '${this::class.simpleName}'")
}

private fun O.reset() = when(this) {
is NullableFloat8Holder -> (this as NullableFloat8Holder).reset()
is Float8Holder -> (this as Float8Holder).reset()
is BitHolder -> (this as BitHolder).reset()
is NullableBitHolder -> (this as NullableBitHolder).reset()
is IntHolder -> (this as IntHolder).reset()
else -> throw IllegalArgumentException("Unsupported value holder type '${this::class.simpleName}'")
}
Expand Down

0 comments on commit 95bcc5c

Please sign in to comment.