Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > afb4c294e8f553dc8d6909c852dc1564 > files > 458

java-1.8.0-openjfx-1.8.0.76-1.b04.1.1.mga5.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_77) on Wed Apr 06 14:51:36 UTC 2016 -->
<title>ListChangeListener.Change (JavaFX 8)</title>
<meta name="date" content="2016-04-06">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="ListChangeListener.Change (JavaFX 8)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":6,"i3":10,"i4":6,"i5":10,"i6":6,"i7":10,"i8":6,"i9":6,"i10":6,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ListChangeListener.Change.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">JavaFX&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../javafx/collections/ListChangeListener.html" title="interface in javafx.collections"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../javafx/collections/MapChangeListener.html" title="interface in javafx.collections"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javafx/collections/ListChangeListener.Change.html" target="_top">Frames</a></li>
<li><a href="ListChangeListener.Change.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">javafx.collections</div>
<h2 title="Class ListChangeListener.Change" class="title">Class ListChangeListener.Change&lt;E&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>javafx.collections.ListChangeListener.Change&lt;E&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>E</code> - the list element type</dd>
</dl>
<dl>
<dt>Enclosing interface:</dt>
<dd><a href="../../javafx/collections/ListChangeListener.html" title="interface in javafx.collections">ListChangeListener</a>&lt;<a href="../../javafx/collections/ListChangeListener.html" title="type parameter in ListChangeListener">E</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public abstract static class <span class="typeNameLabel">ListChangeListener.Change&lt;E&gt;</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Represents a report of a changes done to an Observablelist.
 The Change may consist of one or more actual changes and must be iterated by <a href="../../javafx/collections/ListChangeListener.Change.html#next--"><code>next()</code></a> method.

 Each change must be one of the following:
 <ul>
 <li><b>Permutation change</b> : <a href="../../javafx/collections/ListChangeListener.Change.html#wasPermutated--"><code>wasPermutated()</code></a> returns true in this case.
 The permutation happened at range between <a href="../../javafx/collections/ListChangeListener.Change.html#getFrom--"><code>from</code></a>(inclusive) and <a href="../../javafx/collections/ListChangeListener.Change.html#getTo--"><code>to</code></a>(exclusive) and
 can be queried by calling <a href="../../javafx/collections/ListChangeListener.Change.html#getPermutation-int-"><code>getPermutation(int)</code></a> method.
 <li><b>Add or remove change</b> : In this case, at least one of the <a href="../../javafx/collections/ListChangeListener.Change.html#wasAdded--"><code>wasAdded()</code></a>, <a href="../../javafx/collections/ListChangeListener.Change.html#wasRemoved--"><code>wasRemoved()</code></a> returns true.
 If both methods return true, <a href="../../javafx/collections/ListChangeListener.Change.html#wasReplaced--"><code>wasReplaced()</code></a> will also return true.
 <p>The <a href="../../javafx/collections/ListChangeListener.Change.html#getRemoved--"><code>getRemoved()</code></a> method returns a list of elements that have been
 replaced or removed from the list.
 <p> The range between <a href="../../javafx/collections/ListChangeListener.Change.html#getFrom--"><code>from</code></a>(inclusive) and <a href="../../javafx/collections/ListChangeListener.Change.html#getTo--"><code>to</code></a>(exclusive)
 denotes the sublist of the list that contain new elements. Note that this is a half-open
 interval, so if no elements were added, <code>getFrom()</code> is equal to <code>getTo()</code>.
 <p>It is possible to get a list of added elements by calling getAddedSubList().
 <p>Note that in order to maintain correct indexes of the separate add/remove changes, these changes
 <b>must</b> be sorted by their <code>from</code> index.
 <li><b>Update change</b> : <a href="../../javafx/collections/ListChangeListener.Change.html#wasUpdated--"><code>wasUpdated()</code></a> return true on an update change.
 All elements between <a href="../../javafx/collections/ListChangeListener.Change.html#getFrom--"><code>from</code></a>(inclusive) and <a href="../../javafx/collections/ListChangeListener.Change.html#getTo--"><code>to</code></a>(exclusive) were updated.
 </ul>

 <b>Important:</b> It's necessary to call <a href="../../javafx/collections/ListChangeListener.Change.html#next--"><code>next()</code></a> method before calling
 any other method of <code>Change</code>. The same applies after calling <a href="../../javafx/collections/ListChangeListener.Change.html#reset--"><code>reset()</code></a>.
 The only methods that works at any time is <a href="../../javafx/collections/ListChangeListener.Change.html#getList--"><code>getList()</code></a>.

<p>
 Typical usage is to observe changes on an ObservableList in order
 to hook or unhook (or add or remove a listener) or in order to maintain
 some invariant on every element in that ObservableList. A common code
 pattern for doing this looks something like the following:<br>

 <blockquote><pre>
 ObservableList<Item> theList = ...;

 theList.addListener(new ListChangeListener&lt;Item&gt;() {
     public void onChanged(Change&lt;tem&gt; c) {
         while (c.next()) {
             if (c.wasPermutated()) {
                     for (int i = c.getFrom(); i &lt; c.getTo(); ++i) {
                          //permutate
                     }
                 } else if (c.wasUpdated()) {
                          //update item
                 } else {
                     for (Item remitem : c.getRemoved()) {
                         remitem.remove(Outer.this);
                     }
                     for (Item additem : c.getAddedSubList()) {
                         additem.add(Outer.this);
                     }
                 }
             }
         }
     });

 }</pre></blockquote>
 <p>
 <b>Warning:</b> This class directly accesses the source list to acquire information about the changes.
 <br> This effectively makes the Change object invalid when another change occurs on the list.
 <br> For this reason it is <b>not safe to use this class on a different thread</b>.
 <br> It also means <b>the source list cannot be modified inside the listener</b> since that would invalidate this Change object
 for all subsequent listeners.
 <p>
 Note: in case the change contains multiple changes of different type, these changes must be in the following order:
 <em> permutation change(s), add or remove changes, update changes </em>
 This is because permutation changes cannot go after add/remove changes as they would change the position of added elements.
 And on the other hand, update changes must go after add/remove changes because they refer with their indexes to the current
 state of the list, which means with all add/remove changes applied.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#Change-javafx.collections.ObservableList-">Change</a></span>(<a href="../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;&nbsp;list)</code>
<div class="block">Constructs a new change done to a list.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getAddedSize--">getAddedSize</a></span>()</code>
<div class="block">Size of the interval that was added.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getAddedSubList--">getAddedSubList</a></span>()</code>
<div class="block">To get a subList view of the list that contains only the elements
 added, use getAddedSubList() method.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getFrom--">getFrom</a></span>()</code>
<div class="block">If wasAdded is true, the interval contains all the values that were added.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getList--">getList</a></span>()</code>
<div class="block">The source list of the change.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected abstract int[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getPermutation--">getPermutation</a></span>()</code>
<div class="block">If this change is an permutation, it returns an integer array
 that describes the permutation.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getPermutation-int-">getPermutation</a></span>(int&nbsp;i)</code>
<div class="block">By calling these method, you can observe the permutation that happened.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getRemoved--">getRemoved</a></span>()</code>
<div class="block">An immutable list of removed/replaced elements.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getRemovedSize--">getRemovedSize</a></span>()</code>
<div class="block">Size of getRemoved() list.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#getTo--">getTo</a></span>()</code>
<div class="block">The end of the change interval.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>abstract boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#next--">next</a></span>()</code>
<div class="block">Go to the next change.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#reset--">reset</a></span>()</code>
<div class="block">Reset to the initial stage.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#wasAdded--">wasAdded</a></span>()</code>
<div class="block">Indicates if elements were added during this change</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#wasPermutated--">wasPermutated</a></span>()</code>
<div class="block">Indicates if the change was only a permutation.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#wasRemoved--">wasRemoved</a></span>()</code>
<div class="block">Indicates if elements were removed during this change.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#wasReplaced--">wasReplaced</a></span>()</code>
<div class="block">Indicates if elements were replaced during this change.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../javafx/collections/ListChangeListener.Change.html#wasUpdated--">wasUpdated</a></span>()</code>
<div class="block">Indicates that the elements between getFrom() (inclusive)
 to getTo() exclusive has changed.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="Change-javafx.collections.ObservableList-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Change</h4>
<pre>public&nbsp;Change(<a href="../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;&nbsp;list)</pre>
<div class="block">Constructs a new change done to a list.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>list</code> - that was changed</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="next--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>next</h4>
<pre>public abstract&nbsp;boolean&nbsp;next()</pre>
<div class="block">Go to the next change.
 The Change in the initial state is invalid a requires a call to next() before
 calling other methods. The first next() call will make this object
 represent the first change.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if switched to the next change, false if this is the last change.</dd>
</dl>
</li>
</ul>
<a name="reset--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre>public abstract&nbsp;void&nbsp;reset()</pre>
<div class="block">Reset to the initial stage. After this call, the next() must be called
 before working with the first change.</div>
</li>
</ul>
<a name="getList--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getList</h4>
<pre>public&nbsp;<a href="../../javafx/collections/ObservableList.html" title="interface in javafx.collections">ObservableList</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;&nbsp;getList()</pre>
<div class="block">The source list of the change.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a list that was changed</dd>
</dl>
</li>
</ul>
<a name="getFrom--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFrom</h4>
<pre>public abstract&nbsp;int&nbsp;getFrom()</pre>
<div class="block">If wasAdded is true, the interval contains all the values that were added.
 If wasPermutated is true, the interval marks the values that were permutated.
 If wasRemoved is true and wasAdded is false, getFrom() and getTo() should
 return the same number - the place where the removed elements were positioned in the list.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a beginning (inclusive) of an interval related to the change</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="getTo--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTo</h4>
<pre>public abstract&nbsp;int&nbsp;getTo()</pre>
<div class="block">The end of the change interval.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a end (exclusive) of an interval related to the change.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../javafx/collections/ListChangeListener.Change.html#getFrom--"><code>getFrom()</code></a></dd>
</dl>
</li>
</ul>
<a name="getRemoved--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoved</h4>
<pre>public abstract&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;&nbsp;getRemoved()</pre>
<div class="block">An immutable list of removed/replaced elements. If no elements
 were removed from the list, an empty list is returned.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a list with all the removed elements</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="wasPermutated--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wasPermutated</h4>
<pre>public&nbsp;boolean&nbsp;wasPermutated()</pre>
<div class="block">Indicates if the change was only a permutation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the change was just a permutation.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="wasAdded--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wasAdded</h4>
<pre>public&nbsp;boolean&nbsp;wasAdded()</pre>
<div class="block">Indicates if elements were added during this change</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if something was added to the list</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="wasRemoved--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wasRemoved</h4>
<pre>public&nbsp;boolean&nbsp;wasRemoved()</pre>
<div class="block">Indicates if elements were removed during this change.
 Note that using set will also produce a change with wasRemoved() returning
 true. See <a href="../../javafx/collections/ListChangeListener.Change.html#wasReplaced--"><code>wasReplaced()</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if something was removed from the list</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="wasReplaced--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wasReplaced</h4>
<pre>public&nbsp;boolean&nbsp;wasReplaced()</pre>
<div class="block">Indicates if elements were replaced during this change.
 This is usually true when set is called on the list.
 Set operation will act like remove and add operation at the same time.
 <p>
 Usually, it's not necessary to use this method directly.
 Handling remove operation and then add operation, as in the example <a href="../../javafx/collections/ListChangeListener.Change.html" title="class in javafx.collections"><code>above</code></a>,
 will effectively handle also set operation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>same <code> as wasAdded() && wasRemoved() </code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="wasUpdated--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wasUpdated</h4>
<pre>public&nbsp;boolean&nbsp;wasUpdated()</pre>
<div class="block">Indicates that the elements between getFrom() (inclusive)
 to getTo() exclusive has changed.
 This is the only optional event type and may not be
 fired by all ObservableLists.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the current change is an update change.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>JavaFX 2.1</dd>
</dl>
</li>
</ul>
<a name="getAddedSubList--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAddedSubList</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../javafx/collections/ListChangeListener.Change.html" title="type parameter in ListChangeListener.Change">E</a>&gt;&nbsp;getAddedSubList()</pre>
<div class="block">To get a subList view of the list that contains only the elements
 added, use getAddedSubList() method.
 This is actually a shortcut to <code>c.getList().subList(c.getFrom(), c.getTo());</code><br>

 <pre><code>
 for (Node n : change.getAddedSubList()) {
       // do something
 }
 </code></pre></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the newly created sublist view that contains all the added elements.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="getRemovedSize--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemovedSize</h4>
<pre>public&nbsp;int&nbsp;getRemovedSize()</pre>
<div class="block">Size of getRemoved() list.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of removed items</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="getAddedSize--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAddedSize</h4>
<pre>public&nbsp;int&nbsp;getAddedSize()</pre>
<div class="block">Size of the interval that was added.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of added items</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="getPermutation--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPermutation</h4>
<pre>protected abstract&nbsp;int[]&nbsp;getPermutation()</pre>
<div class="block">If this change is an permutation, it returns an integer array
 that describes the permutation.
 This array maps directly from the previous indexes to the new ones.
 This method is not publicly accessible and therefore can return an array safely.
 The 0 index of the array corresponds to index <a href="../../javafx/collections/ListChangeListener.Change.html#getFrom--"><code>getFrom()</code></a> of the list. The same applies
 for the last index and <a href="../../javafx/collections/ListChangeListener.Change.html#getTo--"><code>getTo()</code></a>.
 The method is used by <a href="../../javafx/collections/ListChangeListener.Change.html#wasPermutated--"><code>wasPermutated()</code></a> and <a href="../../javafx/collections/ListChangeListener.Change.html#getPermutation-int-"><code>getPermutation(int)</code></a> methods.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>empty array if this is not permutation or an integer array containing the permutation</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this Change is in initial state</dd>
</dl>
</li>
</ul>
<a name="getPermutation-int-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getPermutation</h4>
<pre>public&nbsp;int&nbsp;getPermutation(int&nbsp;i)</pre>
<div class="block">By calling these method, you can observe the permutation that happened.
 In order to get the new position of an element, you must call:
 <pre>
    change.getPermutation(oldIndex);
 </pre>

 Note: default implementation of this method takes the information
 from <a href="../../javafx/collections/ListChangeListener.Change.html#getPermutation--"><code>getPermutation()</code></a> method. You don't have to override this method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>i</code> - the old index that contained the element prior to this change</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new index of the same element</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - if i is out of the bounds of the list</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if this is not a permutation change</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ListChangeListener.Change.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">JavaFX&nbsp;8</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../javafx/collections/ListChangeListener.html" title="interface in javafx.collections"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../javafx/collections/MapChangeListener.html" title="interface in javafx.collections"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?javafx/collections/ListChangeListener.Change.html" target="_top">Frames</a></li>
<li><a href="ListChangeListener.Change.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><small><a href="https://docs.oracle.com/javase/8/docs/legal/cpyr.html">Copyright</a> (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.</small></small></p>
</body>
</html>