-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds useful kdocs for all members declared in AnyElement and other kdocs improvements #73
Conversation
/** See [AnyElement]. */ | ||
/** | ||
* Attempts to narrow this element to a [IntElement] or `null`. | ||
* If this element is not an Ion `bool` or `null.null`, throws an [IonElementConstraintException]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/bool/int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch—thank you!
public fun asStructOrNull(): StructElement? | ||
|
||
/** | ||
* If this is an Ion integer, returns its [IntElementSize] otherwise, throws [IonElementConstraintException]. | ||
*/ | ||
public val integerSize: IntElementSize | ||
|
||
/** See [AnyElement]. */ | ||
/** | ||
* Gets the value of the element, assuming that it is a non-null Ion `bool`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I wouldn't use the term 'gets' for properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not thrilled with "gets", but I couldn't think of a better way to phrase it. Got any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something like this?
* Gets the value of the element, assuming that it is a non-null Ion `bool`. | |
* The value of the element, assuming that the element is a non-null Ion `bool`. | |
* Attempting to access this property on an element that violates the type assumption will result in an [IonElementConstraintException]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea... I want to suggest "Access" though that may be a bit wordy.
Codecov Report
@@ Coverage Diff @@
## master #73 +/- ##
=========================================
Coverage 88.06% 88.06%
Complexity 453 453
=========================================
Files 30 30
Lines 821 821
Branches 72 72
=========================================
Hits 723 723
Misses 65 65
Partials 33 33
Continue to review full report at Codecov.
|
Issue #, if available:
#67
Description of changes:
This adds the documentation changes mentioned in #67
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.