package com.icloud.server.scala.engine.web

import com.icloud.server.utils.JsonUtils

import java.util
import java.util.regex.{Matcher, Pattern}

object test {
  def main(args: Array[String]): Unit = {
//    var result="asd"
//    val map = new util.HashMap[String,String]()
//    map.put("attau",result)
//    val str = JsonUtils.toJsonString(map)
//    println(str)
//    var word = "@@全部内容"
//    val result = word.search("全部内容")
//    console.log(word.search("全部内容") != -1)


//    val a = new AA("q", new BB("q", "1"))
//    val b = new AA("2", new BB("c", "2"))
//    val c = new AA("3", new BB("d", "3"))
    var si=Set(1,2,3,4,5,6)
//    var s1=Set()
//    val value = si.filter(x => x == 1).toSet
//    println(value)
//        var si=Set(a,b,c)
//    val value = si.filter(x => x.b.a.equals("c")).toSet
//        println(value)
//    var s="asdasdasd aas"
//    println(s.hashCode)
//    println(patterns("1qweqwe", "1qweqweasdas"))
//    println(patterns("1qweqweasdas", "1qweqwe"))

//    请求url = http://pay.finekaa.com/?code=031eUSkl2420B94onZkl2UsF400eUSkn&state=1
//      数据库域名:http://pay.finekaa.com
//      域名校验结果:false
    var s1="http://pay.finekaa.com/?code=031eUSkl2420B94onZkl2UsF400eUSkn&state=1"
    var s2="http://pay.finekaa.com"
    println(patterns(s1, s2))
    println(patterns(s2, s1))



  }
  def patterns(param1:String,param2:String): Boolean ={
    var boolean=false
    val pattern = Pattern.compile( param1 )
    val matcher: Matcher = pattern.matcher( param2 )
    boolean = matcher.find
    boolean
  }
}
case class AA(a:String,b:BB)

case class BB(a:String,b:String)
