Groovy Documentation

groovy.org.codenarc.rule.unnecessary
[Groovy] Class UnnecessaryDoubleInstantiationRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.unnecessary.UnnecessaryDoubleInstantiationRule

class UnnecessaryDoubleInstantiationRule
extends AbstractAstVisitorRule

It is unnecessary to instantiate Double objects. Instead just use the double literal or the 'D' identifier to force the type, such as 123.45d or 0.42d.

Authors:
Hamlet D'Arcy


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation