Class Index | File Index

Classes


Class FurnitureCategory


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Create a category.
Method Summary
Method Attributes Method Name and Description
 
add(piece)
Adds a piece of furniture to this category.
 
compareTo(category)
Compares the names of this category and the one in parameter.
 
equals(obj)
Returns true if this category and the one in parameter have the same name.
 
Returns the furniture list of this category sorted by name.
 
Returns the count of furniture in this category.
 
Returns the index of the given piece of furniture.
 
Returns the name of this category.
 
Returns the piece of furniture at a given index.
Class Detail
FurnitureCategory(name)
Create a category.
Author: Emmanuel Puybaret.
Parameters:
{string} name
the name of the category.
Method Detail
add(piece)
Adds a piece of furniture to this category.
Parameters:
{CatalogPieceOfFurniture} piece
the piece to add.

{number} compareTo(category)
Compares the names of this category and the one in parameter.
Parameters:
{FurnitureCategory} category
Returns:
{number}

{boolean} equals(obj)
Returns true if this category and the one in parameter have the same name.
Parameters:
{Object} obj
Returns:
{boolean}

{CatalogPieceOfFurniture[]} getFurniture()
Returns the furniture list of this category sorted by name.
Returns:
{CatalogPieceOfFurniture[]} a list of furniture.

{number} getFurnitureCount()
Returns the count of furniture in this category.
Returns:
{number}

{number} getIndexOfPieceOfFurniture(piece)
Returns the index of the given piece of furniture.
Parameters:
{CatalogPieceOfFurniture} piece
Returns:
{number}

{string} getName()
Returns the name of this category.
Returns:
{string}

{CatalogPieceOfFurniture} getPieceOfFurniture(index)
Returns the piece of furniture at a given index.
Parameters:
{number} index
Returns:
{CatalogPieceOfFurniture}

© Copyrights 2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 25 2017 16:36:08 GMT+0200 (CEST)