Sweet Home 3D 3.4

com.eteks.sweethome3d.model
Class FurnitureCategory

java.lang.Object
  extended by com.eteks.sweethome3d.model.FurnitureCategory
All Implemented Interfaces:
java.lang.Comparable<FurnitureCategory>

public class FurnitureCategory
extends java.lang.Object
implements java.lang.Comparable<FurnitureCategory>

Category of furniture.

Author:
Emmanuel Puybaret

Constructor Summary
FurnitureCategory(java.lang.String name)
          Create a category.
 
Method Summary
 int compareTo(FurnitureCategory category)
          Compares the names of this category and the one in parameter.
 boolean equals(java.lang.Object obj)
          Returns true if this category and the one in parameter have the same name.
 java.util.List<CatalogPieceOfFurniture> getFurniture()
          Returns the furniture list of this category sorted by name.
 int getFurnitureCount()
          Returns the count of furniture in this category.
 java.lang.String getName()
          Returns the name of this category.
 CatalogPieceOfFurniture getPieceOfFurniture(int index)
          Returns the piece of furniture at a given index.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FurnitureCategory

public FurnitureCategory(java.lang.String name)
Create a category.

Parameters:
name - the name of the category.
Method Detail

getName

public java.lang.String getName()
Returns the name of this category.


getFurniture

public java.util.List<CatalogPieceOfFurniture> getFurniture()
Returns the furniture list of this category sorted by name.

Returns:
an unmodifiable list of furniture.

getFurnitureCount

public int getFurnitureCount()
Returns the count of furniture in this category.


getPieceOfFurniture

public CatalogPieceOfFurniture getPieceOfFurniture(int index)
Returns the piece of furniture at a given index.


equals

public boolean equals(java.lang.Object obj)
Returns true if this category and the one in parameter have the same name.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(FurnitureCategory category)
Compares the names of this category and the one in parameter.

Specified by:
compareTo in interface java.lang.Comparable<FurnitureCategory>

Sweet Home 3D 3.4

? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License