java - Why is there no @DoubleRange annotation in Android Studio Support Annotations like @IntRange and @FloatRange -


i read article on android studio support annotations today , started using these annotations in code, here example:

public final static class googlemapszoomlevel {      public static final int min_zoom_level = 0;     public static final int max_zoom_level = 21;      ..      public googlemapszoomlevel(@intrange(from=min_zoom_level, to=max_zoom_level) int zoomlevel) {         if (zoomlevel < min_zoom_level || zoomlevel > max_zoom_level) {             throw new illegalargumentexception(error_zoom_level_out_of_bounds);         }         this.zoomlevel = zoomlevel;     }     .. } 

further down in code have class accepts double values in it's constructor, there no @doublerange annotation. use @floatrange or nothing @ all? same question long values

actually, @floatrange 's documentation states:

denotes annotated element should float or double in given range 

and similar situation @intrange

denotes annotated element should int or long in given range 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -