blob: bf0f0096b022d50da2efff8bd08c0d5ca9474f2b [file]
<html devsite="true">
<head>
<title>IntRange</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<div itemscope="" itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="IntRange">
<meta itemprop="path" content="androidx.annotation">
<meta itemprop="property" content="getFrom()">
<meta itemprop="property" content="getTo()">
<meta itemprop="language" content="JAVA">
</div>
<div id="header-block">
<div>
<h1>IntRange</h1>
</div>
<div id="metadata-info-block">
<div id="source-link"><a href="https://cs.android.com/search?q=file:androidx/annotation/IntRange.kt+class:androidx.annotation.IntRange&amp;ss=androidx/platform/frameworks/support" class="external">View Source</a></div>
</div>
</div>
<div id="refdoc-switcher-placeholder"></div>
<p>
<pre>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-must-be-documented/index.html">MustBeDocumented</a><br>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-retention/index.html">Retention</a>(value&nbsp;=&nbsp;AnnotationRetention.BINARY)<br>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.annotation/-target/index.html">Target</a>(allowedTargets&nbsp;=&nbsp;[AnnotationTarget.FUNCTION,&nbsp;AnnotationTarget.PROPERTY_GETTER,&nbsp;AnnotationTarget.PROPERTY_SETTER,&nbsp;AnnotationTarget.VALUE_PARAMETER,&nbsp;AnnotationTarget.FIELD,&nbsp;AnnotationTarget.LOCAL_VARIABLE,&nbsp;AnnotationTarget.ANNOTATION_CLASS])<br>public annotation <a href="/reference/androidx/annotation/IntRange.html">IntRange</a></pre>
</p>
<hr>
<p>Denotes that the annotated element should be an int or long in the given range.</p>
<p>Example:</p>
<pre class="prettyprint">@IntRange(from=0,to=255)<br>public int getAlpha() {<br> ...<br>}</pre>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public constructors</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td>
<div><code><a href="/reference/androidx/annotation/IntRange.html#IntRange(kotlin.Long,kotlin.Long)">IntRange</a>(long&nbsp;from,&nbsp;long&nbsp;to)</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
<col width="40%">
<col>
</colgroup>
<thead>
<tr>
<th colspan="100%"><h3>Public methods</h3></th>
</tr>
</thead>
<tbody class="list">
<tr>
<td><code>final long</code></td>
<td>
<div><code><a href="/reference/androidx/annotation/IntRange.html#getFrom()">getFrom</a>()</code></div>
<p>Smallest value, inclusive</p>
</td>
</tr>
<tr>
<td><code>final long</code></td>
<td>
<div><code><a href="/reference/androidx/annotation/IntRange.html#getTo()">getTo</a>()</code></div>
<p>Largest value, inclusive</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="list">
<h2>Public constructors</h2>
<div class="api-item"><a name="IntRange(kotlin.Long, kotlin.Long)"></a><a name="IntRange-kotlin.Long-kotlin.Long-"></a><a name="intrange"></a>
<div class="api-name-block">
<div>
<h3 id="IntRange(kotlin.Long,kotlin.Long)">IntRange</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;<a href="/reference/androidx/annotation/IntRange.html#IntRange(kotlin.Long,kotlin.Long)">IntRange</a>(long&nbsp;from,&nbsp;long&nbsp;to)</pre>
</div>
</div>
<div class="list">
<h2>Public methods</h2>
<div class="api-item"><a name="getFrom--"></a><a name="getfrom"></a>
<div class="api-name-block">
<div>
<h3 id="getFrom()">getFrom</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;long&nbsp;<a href="/reference/androidx/annotation/IntRange.html#getFrom()">getFrom</a>()</pre>
<p>Smallest value, inclusive</p>
</div>
<div class="api-item"><a name="getTo--"></a><a name="getto"></a>
<div class="api-name-block">
<div>
<h3 id="getTo()">getTo</h3>
</div>
</div>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;long&nbsp;<a href="/reference/androidx/annotation/IntRange.html#getTo()">getTo</a>()</pre>
<p>Largest value, inclusive</p>
</div>
</div>
</body>
</html>