Coverage Report - org.jtheque.primary.od.impl.abstraction.AbstractData
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractData
0 %
0/12
N/A
1.273
 
 1  
 package org.jtheque.primary.od.impl.abstraction;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.jtheque.core.managers.persistence.AbstractEntity;
 20  
 import org.jtheque.primary.od.able.Data;
 21  
 import org.jtheque.primary.view.impl.models.tree.TreeElement;
 22  
 
 23  
 import javax.swing.Icon;
 24  
 
 25  
 /**
 26  
  * Represents a persisted object of JTheque.
 27  
  *
 28  
  * @author Baptiste Wicht
 29  
  */
 30  0
 public abstract class AbstractData extends AbstractEntity implements Data {
 31  
         @Override
 32  
         public final String getElementName(){
 33  0
                 return getDisplayableText();
 34  
         }
 35  
 
 36  
         @Override
 37  
         public Icon getIcon(){
 38  0
                 return null;
 39  
         }
 40  
 
 41  
         @Override
 42  
         public boolean isRoot(){
 43  0
                 return false;
 44  
         }
 45  
 
 46  
         @Override
 47  
         public boolean isCategory(){
 48  0
                 return false;
 49  
         }
 50  
 
 51  
         @Override
 52  
         public boolean isLeaf(){
 53  0
                 return true;
 54  
         }
 55  
 
 56  
         @Override
 57  
         public TreeElement getChild(int index){
 58  0
                 return null;
 59  
         }
 60  
 
 61  
         @Override
 62  
         public int getChildCount(){
 63  0
                 return 0;
 64  
         }
 65  
 
 66  
         @Override
 67  
         public int indexOf(TreeElement treeElement){
 68  0
                 return -1;
 69  
         }
 70  
 
 71  
         @Override
 72  
         public void add(TreeElement element){
 73  0
                 throw new UnsupportedOperationException("Add is not supported on leaf");
 74  
         }
 75  
 
 76  
         @Override
 77  
         public void addAll(Iterable<? extends TreeElement> elements){
 78  0
                 throw new UnsupportedOperationException("Add is not supported on leaf");
 79  
         }
 80  
 
 81  
         @Override
 82  
         public void clear(){
 83  0
                 throw new UnsupportedOperationException("Clear is not supported on leaf");
 84  
         }
 85  
 }