summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorAdam Wagner <wbadam@users.noreply.github.com>2018-02-08 11:20:32 +0200
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-02-08 11:20:32 +0200
commit1817a82ed8f3c8839c18d9ce6b68e5838940a22c (patch)
tree3a110ba043aa4bea415b4060c4eba4439703711b /shared
parent299520fac11dac9b31d6fd762a3eb76ef827ec5b (diff)
downloadvaadin-framework-1817a82ed8f3c8839c18d9ce6b68e5838940a22c.tar.gz
vaadin-framework-1817a82ed8f3c8839c18d9ce6b68e5838940a22c.zip
Add recursive expand and collapse method to TreeGrid and Tree (#10283)
Diffstat (limited to 'shared')
-rw-r--r--shared/src/main/java/com/vaadin/shared/Range.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/Range.java b/shared/src/main/java/com/vaadin/shared/Range.java
index 042cc527a0..b47963fd50 100644
--- a/shared/src/main/java/com/vaadin/shared/Range.java
+++ b/shared/src/main/java/com/vaadin/shared/Range.java
@@ -31,6 +31,9 @@ import java.io.Serializable;
* @author Vaadin Ltd
*/
public final class Range implements Serializable {
+
+ private static final Range EMPTY = Range.withLength(0, 0);
+
private final int start;
private final int end;
@@ -90,6 +93,10 @@ public final class Range implements Serializable {
return new Range(start, start + length);
}
+ public static Range emptyRange() {
+ return EMPTY;
+ }
+
/**
* Creates a new range between two numbers: <code>[start..end[</code>.
*