Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
working on the type converter
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Dec 27, 2019
1 parent 6ccb1a1 commit c5b8dcf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/andromeda/araserver/iot/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Main {
val currentState = GetDeviceValues().yamlArrayToObjectList(device.status, deviceClass)
val pair = currentState!![0] to deviceClass
val actionPair = action?.split(":")
println(currentState[0] )
println(actionPair)
val classToMod = pair.second.kotlin
println(classToMod.memberProperties)
WriteNewVal().main( actionPair, currentState[0])
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/com/andromeda/araserver/util/To.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.andromeda.araserver.util

import java.io.IOException

class To {
fun boolean(string: String): Boolean {
return when (string) {
"true" -> true
"false" -> false
else -> throw IOException()
}
}
}

0 comments on commit c5b8dcf

Please sign in to comment.