From 1817a82ed8f3c8839c18d9ce6b68e5838940a22c Mon Sep 17 00:00:00 2001 From: Adam Wagner Date: Thu, 8 Feb 2018 11:20:32 +0200 Subject: Add recursive expand and collapse method to TreeGrid and Tree (#10283) --- shared/src/main/java/com/vaadin/shared/Range.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'shared') 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: [start..end[. * -- cgit v1.2.3