Here you can find the source of isTreePathContainedInExpansionState(TreePath treePath, ArrayList
private static boolean isTreePathContainedInExpansionState(TreePath treePath, ArrayList<String> expansionStateStrings)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import javax.swing.tree.TreePath; public class Main { private static boolean isTreePathContainedInExpansionState(TreePath treePath, ArrayList<String> expansionStateStrings) { if (treePath != null && expansionStateStrings != null) { return expansionStateStrings.contains(treePath.toString()); }/*from w w w .ja v a 2 s . com*/ return false; } }