This repository was archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Added new parameter #148
Merged
Merged
Added new parameter #148
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9d45ed2
Added Int, List, Boolean and Double parameter
derNiklaas be7966e
Added Map parameter
derNiklaas e1473ac
Added javadoc stuff
derNiklaas 308de78
Added Color parameter (thanks @justgerd)
derNiklaas b93b859
Implemented changes from @justgerd
derNiklaas 946595c
Added URI parameter
derNiklaas aacdd21
Added missing catch block to int/double parsing
derNiklaas e688650
Added short comments to the regex
derNiklaas e5bbc81
Changed internal List/Map type to scala
derNiklaas 067384b
Removed Errorhandling and removed some useless lines
derNiklaas 692858d
Let the Colorparameter throw an exception if no regex is matched
derNiklaas 895f22f
Let the Mapparameter throw an exception if no regex is matched
derNiklaas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added URI parameter
- Loading branch information
commit 946595c94895920aaa25ef6d94fe512e8bb786e0
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/main/scala/org/codeoverflow/chatoverflow/requirement/parameter/UriParameterImpl.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.codeoverflow.chatoverflow.requirement.parameter | ||
|
||
import org.codeoverflow.chatoverflow.api.io.parameter.UriParameter | ||
import org.codeoverflow.chatoverflow.registry.Impl | ||
import java.net.URI | ||
|
||
@Impl(impl = classOf[UriParameter]) | ||
class UriParameterImpl extends UriParameter { | ||
private var value: URI = null | ||
|
||
override def getType: Class[URI] = classOf[URI] | ||
|
||
override def serialize(): String = get().toString | ||
|
||
override def get(): URI = value | ||
|
||
override def deserialize(value: String): Unit = set(new URI(value)) | ||
|
||
override def set(value: URI): Unit = this.value = value | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.