static <T> WindowSpecification<T> of(Comparator<? super T> orderBy, long lower, long upper) {
        return new WindowSpecificationImpl<>(t -> SeqImpl.NULL, orderBy, lower, upper);
    }
A window containing the data for its partition, to perform calculations upon.
<p>
Window functions as exposed in this type are inspired by their counterparts
in SQL. They include:
<h3>Ranking functions</h3>
Ranking functions are useful to determine the "rank" of any given row within
the partition, given a specific ordering. The following table explains
individual ranking functions:
<table>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr>
<td>{@link #rowNumber()}</td><td>The distinct row number of the row within
the partition, counting from <code>0</code>.</td>
</tr>
<tr>
<td>{@link #rank()}</td><td>The rank with gaps of a row within the partition,
counting from <code>0</code>.</td>
</tr>
<tr>
<td>{@link #denseRank()}</td><td>The rank without gaps of a row within the
partition, counting from <code>0</code>.</td>
</tr>
<tr>
<td>{@link #percentRank()}</td><td>Relative rank of a row:
{@link #rank()} / {@link #count()}.</td>
</tr>
<tr>
<td>{@link #ntile(long)}</td><td>Divides the partition in equal buckets and
assigns values between <code>0</code> and <code>buckets - 1</code>.</td>
</tr>
<tr>
<td>{@link #lead()}</td><td>Gets the value after the current row.</td>
</tr>
<tr>
<td>{@link #lag()}</td><td>Gets the value before the current row.</td>
</tr>
<tr>
<td>{@link #firstValue()}</td><td>Gets the first value in the window.</td>
</tr>
<tr>
<td>{@link #lastValue()}</td><td>Gets the last value in the window.</td>
</tr>
<tr>
<td>{@link #nthValue(long)}</td><td>Gets the nth value in the window,
counting from <code>0</code>.</td>
</tr>
</table>
<p>
<strong>Note:</strong> In Java, indexes are always counted from
<code>0</code>, not from <code>1</code> as in SQL. This means that the above
ranking functions also rank rows from zero. This is particularly true for:
<ul>
<li>{@link #rowNumber()}</li>
<li>{@link #rank()}</li>
<li>{@link #denseRank()}</li>
<li>{@link #ntile(long)}</li>
<li>{@link #nthValue(long)}</li>
</ul>

<h3>Aggregate functions</h3>
Each aggregate function from {@link Seq} or from {@link Agg} is also
available as an aggregate function on the window. For instance,
{@link #count()} is the same as calling {@link Seq#count()} on
{@link #window()}

@author Lukas Eder
jOOL/src/main/java/org/jooq/lambda/Window.java