Skip to content

Extensions#20

Open
mitchdoran92 wants to merge 12 commits into1.xfrom
extensions
Open

Extensions#20
mitchdoran92 wants to merge 12 commits into1.xfrom
extensions

Conversation

@mitchdoran92
Copy link

Added Alarm, Timer, Calendar and Map to Shelly.

All classes include documentation.

More features could be added to Map

PTAL @AngusMorton @mcpotter

private Boolean skipUi;

Alarm() {
this.daysToRepeat = new ArrayList<>(7);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could just initialise this up in the list of fields? Or when they first go to add a day to repeat the alarm on maybe?

*/
@NonNull
@CheckResult
public Calendar eventEndTime(@NonNull java.util.Calendar calendar) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fully qualified names make me miss kotlin, lol.

*/
@NonNull
@CheckResult
public Map latitude(@NonNull Double latitude) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

situations like here I think using the boxed value is fine because we need the user to specify both the latitude and longitude.

*/
@NonNull
@CheckResult
public Alarm silenceRingTone(@NonNull Boolean silenceRingTone) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you change this to accept a primitive instead you don't need to do the null check and you get the same result. Maybe we should have a discussion about whether we want to take primitives instead of boxed values whenever possible? What do you think, @AngusMorton?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants