自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 UML 类图

继承: 实线 + 空心三角 实现: 虚线 + 空心三角  依赖: 虚线 + 箭头关联: 实线 + 箭头聚合: 箭头 + 空心菱形合成: 箭头 + 实心菱形

2015-03-04 15:56:47 154

原创 Java shut down hook

 Runtime.getRuntime().addShutdownHook(Thread);Before JVM shut down, it will call each hook you added. 

2014-12-15 11:02:47 92

原创 Java generic methond without any parameters

Regarding following class: We define a generic class, but we donot have a method to resolve the generic.public final class Event<T> { private T event; private Event() {}...

2014-12-15 10:34:25 84

原创 Difference between matches() and find() in Java Regex Matcher

I am trying to understand the difference between matches() and find(). matches() tries to match the expression against the entire string and implicitly add a ^ at the start and $ at the end of y...

2014-12-11 14:21:44 104

原创 Mocking and Stubbing

Mockingcount abstract method invocations Stubbingget return of abstract method  //mocking1 * subscriber.receive()//stubbingsubscriber.recerive() >> content//combine moc...

2014-12-10 17:05:07 163

原创 Spock mock generic type interface

public interface EventProducer<T> { public void send(T object);}declaration:def producer = Mock(EventProducer)usage:producer as EventProducer<String> 

2014-12-10 16:34:14 159

原创 Spock Mock Cheatsheet

Spock Mock CheatsheetCraig AtkinsonExecutable examples at github.com/craigatk/spockmockcheatsheet Creating mocksUserService userService = Mock()def userService = Mock(UserService) Ar...

2014-12-10 16:29:38 111

原创 ScheduledExecutorService scheduleWithFixedDelay and scheduleAtFixedRate

ScheduledExecutorService has 2 method to schedule a taskschedule with fixed delayschedule at fixed rateI was confused about delay and rate, they both require a time parameter. What's the dif...

2014-12-03 23:35:48 146

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除