[Training Video - 4] [Groovy] Object equality and variable equality check
def x=2
def y=3 if(x == y){
log.info "equal"
}else{
log.info "not equal" // print out not equal
} TestService s1 = new TestService()
TestService s2 = new TestService()
log.info s1.is(s2) // false
s1=s2
log.info s1.is(s2) // true class TestService{ }
Run result:
Tue Oct 06 21:04:38 CST 2015:INFO:not equal
Tue Oct 06 21:04:38 CST 2015:INFO:false
Tue Oct 06 21:04:38 CST 2015:INFO:true
[Training Video - 4] [Groovy] Object equality and variable equality check的更多相关文章
- [Training Video - 3] [Groovy in Detail] Non-static and Static variables, objects and object referances
log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() ...
- [Training Video - 2] [Groovy Introduction]
Building test suites, Test cases and Test steps in SOAP UI Levels : test step level test case level ...
- [Training Video - 4] [Groovy] Optional parameter in groovy
Employee.log=log Employee e1 = new Employee() log.info e1.add(1,2,3,4) // optional parameters in gro ...
- [Training Video - 3] [Groovy in Detail] Non-static and Static functions, initializing log inside class
log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] Exception Handling in groovy
def x = new String[3] x[0] = "A" x[1] = "B" x[2] = "C" log.info"X ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] HashSet and Hashtable
Hashset: HashSet set = new HashSet() set.add("India") set.add("USA") set.add(&qu ...
- [Training Video - 5] [Groovy Script Test Step - Collections, Exceptions] Array and ArrayList
Array: def x = new String[5] x[0] = "India" x[1] = "USA" x[2] = "Korea" ...
- [Training Video - 4] [Groovy] String Functions
def x="I like to read books before bed" def temp = x.split(" ") log.info "S ...
- [Training Video - 4] [Groovy] Initializing log inside class with constructor
TestService s = new TestService(log,context,testRunner) s.xyz() class TestService{ def log def conte ...
随机推荐
- 工作JS总结
获取 <inpout type="checkbox" value="1" /> 多选项的value /*获取checkbox的全部选中项 使用方法: ...
- date.js
/** * 此JS文件是格式化JS中日期时间的工具类,其中包含了传入日期对象Date,格式化成想要的格式,<br> * 或者传入字符串格式的时间个,次字符串日期对应的格式可以转换为相应的日 ...
- SpringMVC-Spring-Hibernate项目搭建之三-- freemarker & 静态资源整合
一. 前段目录结构如下架构如下: 二. freemarker文件配置 在 web.xml 文件中指定 spring 配置文件的位置 三. 配置springmvc-servlet.xml文件 1)配置自 ...
- java代码----对于数据类型Integer
总结: 主要是方法的理解 老师曾经说过final 和fianlly的区别 我自己的理解就是 如果一个类的前面定义了final,那么它就不能被继承,派生子类,对于方法,那么方法就不能改变,变量前面也是必 ...
- Win10 TensorFlow(gpu)安装详解
Win10 TensorFlow(gpu)安装详解 写在前面:TensorFlow是谷歌基于DistBelief进行研发的第二代人工智能学习系统,其命名来源于本身的运行原理.Tensor(张量)意味着 ...
- PdfPCell对齐方式,边框,边框颜色的使用 (转)
原文:http://www.cnblogs.com/LifelongLearning/archive/2011/06/22/2086802.html PdfPTable和PdfPCell对象,我们可以 ...
- [实践]使用JarJar优雅的发布依赖包
[实践]使用JarJar优雅的发布依赖包 打包工具: Jar Jar Links是一个Java类库重新打包工具. 可以帮助你将其它用到的java库打包并嵌入到你自己的项目jar包中.这样做的原因有: ...
- 十六 在沉睡中停止(在sleep() 状态下停止线程)
1 如果线程在sleep()状态下停止线程,会是什么效果? 答案: 如果在sleep状态下停止某一线程,会进入sleep的catch块中, 抛出InterruptedException 异常,并且清除 ...
- 【BZOJ】2938 [POI2000]病毒(AC自动机)
题目 传送门:QWQ 传送到洛谷QWQ 分析 夏爷爷传送门 代码 #include <bits/stdc++.h> using namespace std; ; ][], fail[N*] ...
- GDI/GDI+这些破事
本文是杂篇,纯属笔记,想到哪写到那! 1.获取像素的RGB以及填充 CPaintDC dc(m_hWnd); COLORREF color=dc.GetPixel(,); int R=GetRValu ...