Skip to content

Commit 3327d81

Browse files
committed
[responsive-validator] - added addtional methods for verification offsets
1 parent c4daddf commit 3327d81

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/main/java/util/validator/ResponsiveValidator.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ public ResponsiveValidator maxWidth(int width) {
150150
return this;
151151
}
152152

153+
@Override
154+
public ResponsiveValidator widthBetween(int min, int max) {
155+
minWidth = min;
156+
maxWidth = max;
157+
return this;
158+
}
159+
153160
@Override
154161
public ResponsiveValidator minHeight(int height) {
155162
minHeight = height;
@@ -162,6 +169,13 @@ public ResponsiveValidator maxHeight(int height) {
162169
return this;
163170
}
164171

172+
@Override
173+
public ResponsiveValidator heightBetween(int min, int max) {
174+
minHeight = min;
175+
maxHeight = max;
176+
return this;
177+
}
178+
165179
@Override
166180
public ResponsiveValidator minOffset(int top, int right, int bottom, int left) {
167181
minTopOffset = top;

src/main/java/util/validator/Validator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ interface Validator {
2626

2727
ResponsiveValidator maxWidth(int width);
2828

29+
ResponsiveValidator widthBetween(int min, int max);
30+
2931
ResponsiveValidator minHeight(int height);
3032

3133
ResponsiveValidator maxHeight(int height);
3234

35+
ResponsiveValidator heightBetween(int min, int max);
36+
3337
ResponsiveValidator minOffset(int top, int right, int bottom, int left);
3438

3539
ResponsiveValidator maxOffset(int top, int right, int bottom, int left);

0 commit comments

Comments
 (0)