public class CatalogPieceOfFurniture extends java.lang.Object implements java.lang.Comparable<CatalogPieceOfFurniture>, PieceOfFurniture, CatalogItem, java.lang.Cloneable
DEFAULT_CUT_OUT_SHAPE, HIDE_EDGE_COLOR_MATERIAL, IDENTITY_ROTATION, SHOW_BACK_FACE
Constructor and Description |
---|
CatalogPieceOfFurniture(java.lang.String name,
Content icon,
Content model,
float width,
float depth,
float height,
boolean movable,
boolean doorOrWindow)
Deprecated.
As of version 1.7, use constructor without
doorOrWindow
parameter since a catalog door and window is supposed to be an instance
of CatalogDoorOrWindow |
CatalogPieceOfFurniture(java.lang.String name,
Content icon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
boolean doorOrWindow,
java.lang.Integer color,
float[][] modelRotation,
boolean backFaceShown,
float iconYaw,
boolean proportional)
Deprecated.
As of version 1.7, use constructor without
doorOrWindow
parameter since a catalog door and window is supposed to be an instance
of CatalogDoorOrWindow |
CatalogPieceOfFurniture(java.lang.String name,
Content icon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
java.lang.Integer color,
float[][] modelRotation,
boolean backFaceShown,
float iconYaw,
boolean proportional)
Creates a modifiable catalog piece of furniture with all its values.
|
CatalogPieceOfFurniture(java.lang.String name,
Content icon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
java.lang.String staircaseCutOutShape,
java.lang.Integer color,
float[][] modelRotation,
boolean backFaceShown,
float iconYaw,
boolean proportional)
Creates a modifiable catalog piece of furniture with all its values.
|
CatalogPieceOfFurniture(java.lang.String name,
Content icon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
java.lang.String staircaseCutOutShape,
java.lang.Integer color,
float[][] modelRotation,
boolean backFaceShown,
java.lang.Long modelSize,
java.lang.String creator,
float iconYaw,
boolean proportional)
Creates a modifiable catalog piece of furniture with all its values.
|
CatalogPieceOfFurniture(java.lang.String name,
Content icon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
java.lang.String staircaseCutOutShape,
java.lang.Integer color,
float[][] modelRotation,
int modelFlags,
java.lang.Long modelSize,
java.lang.String creator,
float iconYaw,
float iconPitch,
float iconScale,
boolean proportional)
Creates a modifiable catalog piece of furniture with all its values.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
float[][] modelRotation,
java.lang.String creator,
boolean resizable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
float[][] modelRotation,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
Content icon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
boolean doorOrWindow,
float[][] modelRotation,
java.lang.String creator,
boolean resizable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage)
Deprecated.
As of version 1.7, use constructor without
doorOrWindow
parameter since a catalog door and window is supposed to be an instance
of CatalogDoorOrWindow |
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
Content icon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
float[][] modelRotation,
java.lang.String creator,
boolean resizable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String information,
java.lang.String[] tags,
java.lang.Long creationDate,
java.lang.Float grade,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String information,
java.lang.String[] tags,
java.lang.Long creationDate,
java.lang.Float grade,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
float dropOnTopElevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
boolean backFaceShown,
java.lang.Long modelSize,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
boolean horizontallyRotatable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String information,
java.lang.String[] tags,
java.lang.Long creationDate,
java.lang.Float grade,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
float dropOnTopElevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
boolean backFaceShown,
java.lang.Long modelSize,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
boolean horizontallyRotatable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String information,
java.lang.String[] tags,
java.lang.Long creationDate,
java.lang.Float grade,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
float dropOnTopElevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
boolean backFaceShown,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String information,
java.lang.String[] tags,
java.lang.Long creationDate,
java.lang.Float grade,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
float dropOnTopElevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
int modelFlags,
java.lang.Long modelSize,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
boolean horizontallyRotatable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String information,
java.lang.String[] tags,
java.lang.Long creationDate,
java.lang.Float grade,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
float dropOnTopElevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
CatalogPieceOfFurniture(java.lang.String id,
java.lang.String name,
java.lang.String description,
java.lang.String information,
java.lang.String license,
java.lang.String[] tags,
java.lang.Long creationDate,
java.lang.Float grade,
Content icon,
Content planIcon,
Content model,
float width,
float depth,
float height,
float elevation,
float dropOnTopElevation,
boolean movable,
java.lang.String staircaseCutOutShape,
float[][] modelRotation,
int modelFlags,
java.lang.Long modelSize,
java.lang.String creator,
boolean resizable,
boolean deformable,
boolean texturable,
boolean horizontallyRotatable,
java.math.BigDecimal price,
java.math.BigDecimal valueAddedTaxPercentage,
java.lang.String currency,
java.util.Map<java.lang.String,java.lang.String> properties,
java.util.Map<java.lang.String,Content> contents)
Creates an unmodifiable catalog piece of furniture of the default catalog.
|
Modifier and Type | Method and Description |
---|---|
CatalogPieceOfFurniture |
clone()
Returns a clone of this piece.
|
int |
compareTo(CatalogPieceOfFurniture piece)
Compares the names of this piece and the one in parameter.
|
boolean |
equals(java.lang.Object obj)
Returns
true if this piece and the one in parameter are the same objects. |
FurnitureCategory |
getCategory()
Returns the category of this piece of furniture.
|
java.lang.Integer |
getColor()
Returns the color of this piece of furniture.
|
Content |
getContentProperty(java.lang.String name)
Returns the value of an additional content
name associated to this piece. |
java.lang.Long |
getCreationDate()
Returns the creation date of this piece in milliseconds since the epoch,
or
null if no date is given to this piece. |
java.lang.String |
getCreator()
Returns the creator of this piece.
|
java.lang.String |
getCurrency()
Returns the price currency, noted with ISO 4217 code, or
null
if it has no price or default currency should be used. |
float |
getDepth()
Returns the depth of this piece of furniture.
|
java.lang.String |
getDescription()
Returns the description of this piece of furniture.
|
float |
getDropOnTopElevation()
Returns the elevation at which should be placed an object dropped on this piece.
|
float |
getElevation()
Returns the elevation of this piece of furniture.
|
protected java.lang.String[] |
getFilterCriteria()
Returns the strings used as criteria for filtering (name, category, creator, license, description and tags).
|
java.lang.Float |
getGrade()
Returns the grade of this piece, or
null if no grade is given to this piece. |
float |
getHeight()
Returns the height of this piece of furniture.
|
Content |
getIcon()
Returns the icon of this piece of furniture.
|
float |
getIconPitch()
Returns the pitch angle used to create the piece icon.
|
float |
getIconScale()
Returns the scale used to create the piece icon.
|
float |
getIconYaw()
Returns the yaw angle used to create the piece icon.
|
java.lang.String |
getId()
Returns the ID of this piece of furniture or
null . |
java.lang.String |
getInformation()
Returns the additional information associated to this piece, or
null . |
java.lang.String |
getLicense()
Returns the license associated to this piece, or
null . |
Content |
getModel()
Returns the 3D model of this piece of furniture.
|
int |
getModelFlags()
Returns the flags which should be applied to the 3D model of this piece of furniture.
|
float[][] |
getModelRotation()
Returns the rotation 3 by 3 matrix of this piece of furniture that ensures
its model is correctly oriented.
|
java.lang.Long |
getModelSize()
Returns the size of the 3D model of this piece of furniture.
|
java.lang.String |
getName()
Returns the name of this piece of furniture.
|
Content |
getPlanIcon()
Returns the icon of this piece of furniture displayed in plan or
null . |
java.math.BigDecimal |
getPrice()
Returns the price of this piece of furniture or
null . |
java.lang.String |
getProperty(java.lang.String name)
Returns the value of an additional property
name of this piece. |
java.util.Collection<java.lang.String> |
getPropertyNames()
Returns the names of the additional properties of this piece.
|
java.lang.String |
getStaircaseCutOutShape()
Returns the shape used to cut out upper levels when they intersect with the piece
like a staircase.
|
java.lang.String[] |
getTags()
Returns the tags associated to this piece.
|
java.math.BigDecimal |
getValueAddedTaxPercentage()
Returns the Value Added Tax percentage applied to the price of this piece of furniture.
|
float |
getWidth()
Returns the width of this piece of furniture.
|
int |
hashCode()
Returns default hash code.
|
boolean |
isBackFaceShown()
Returns
true if the back face of the piece of furniture
model should be displayed. |
boolean |
isContentProperty(java.lang.String name)
Returns
true if the type of given additional property is a content. |
boolean |
isDeformable()
Returns
true if this piece is deformable. |
boolean |
isDoorOrWindow()
Returns
true if this piece of furniture is a door or a window. |
boolean |
isHorizontallyRotatable()
Returns
false if this piece should not rotate around an horizontal axis. |
boolean |
isModifiable()
Returns
true if this piece is modifiable (not read from resources). |
boolean |
isMovable()
Returns
true if this piece of furniture is movable. |
boolean |
isProportional()
Returns
true if size proportions should be kept. |
boolean |
isResizable()
Returns
true if this piece is resizable. |
boolean |
isTexturable()
Returns
false if this piece should always keep the same color or texture. |
boolean |
isWidthDepthDeformable()
Returns
true if this piece is deformable. |
boolean |
matchesFilter(java.lang.String filter)
Returns
true if this piece matches the given filter text. |
public CatalogPieceOfFurniture(java.lang.String name, Content icon, Content model, float width, float depth, float height, boolean movable, boolean doorOrWindow)
doorOrWindow
parameter since a catalog door and window is supposed to be an instance
of CatalogDoorOrWindow
name
- the name of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new piecemovable
- if true
, the new piece is movabledoorOrWindow
- if true
, the new piece is a door or a windowpublic CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, Content icon, Content model, float width, float depth, float height, float elevation, boolean movable, boolean doorOrWindow, float[][] modelRotation, java.lang.String creator, boolean resizable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage)
doorOrWindow
parameter since a catalog door and window is supposed to be an instance
of CatalogDoorOrWindow
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movabledoorOrWindow
- if true
, the new piece is a door or a windowmodelRotation
- the rotation 3 by 3 matrix applied to the piece modelcreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editedprice
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, Content icon, Content model, float width, float depth, float height, float elevation, boolean movable, float[][] modelRotation, java.lang.String creator, boolean resizable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelcreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editedprice
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, boolean movable, float[][] modelRotation, java.lang.String creator, boolean resizable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceicon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelcreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editedprice
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, boolean movable, float[][] modelRotation, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceicon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelcreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texture.price
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceicon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelcreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texture.price
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String information, java.lang.String[] tags, java.lang.Long creationDate, java.lang.Float grade, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceinformation
- additional information associated to the new piecetags
- tags associated to the new piececreationDate
- creation date of the new piece in milliseconds since the epochgrade
- grade of the piece of furniture or null
icon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelcreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texture.price
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String information, java.lang.String[] tags, java.lang.Long creationDate, java.lang.Float grade, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, float dropOnTopElevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceinformation
- additional information associated to the new piecetags
- tags associated to the new piececreationDate
- creation date of the new piece in milliseconds since the epochgrade
- grade of the piece of furniture or null
icon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecedropOnTopElevation
- a percentage of the height at which should be placed
an object dropped on the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelcreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texture.price
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String information, java.lang.String[] tags, java.lang.Long creationDate, java.lang.Float grade, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, float dropOnTopElevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, boolean backFaceShown, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceinformation
- additional information associated to the new piecetags
- tags associated to the new piececreationDate
- creation date of the new piece in milliseconds since the epochgrade
- grade of the piece of furniture or null
icon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecedropOnTopElevation
- a percentage of the height at which should be placed
an object dropped on the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelbackFaceShown
- true
if back face should be shown instead of front facescreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texture.price
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String information, java.lang.String[] tags, java.lang.Long creationDate, java.lang.Float grade, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, float dropOnTopElevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, boolean backFaceShown, java.lang.Long modelSize, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, boolean horizontallyRotatable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceinformation
- additional information associated to the new piecetags
- tags associated to the new piececreationDate
- creation date of the new piece in milliseconds since the epochgrade
- grade of the piece of furniture or null
icon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecedropOnTopElevation
- a percentage of the height at which should be placed
an object dropped on the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelbackFaceShown
- true
if back face should be shown instead of front facesmodelSize
- size of the 3D model of the new piececreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texturehorizontallyRotatable
- if false
this piece
should not rotate around an horizontal axisprice
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String information, java.lang.String[] tags, java.lang.Long creationDate, java.lang.Float grade, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, float dropOnTopElevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, boolean backFaceShown, java.lang.Long modelSize, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, boolean horizontallyRotatable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency, java.util.Map<java.lang.String,java.lang.String> properties)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceinformation
- additional information associated to the new piecetags
- tags associated to the new piececreationDate
- creation date of the new piece in milliseconds since the epochgrade
- grade of the piece of furniture or null
icon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecedropOnTopElevation
- a percentage of the height at which should be placed
an object dropped on the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelbackFaceShown
- true
if back face should be shown instead of front facesmodelSize
- size of the 3D model of the new piececreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texturehorizontallyRotatable
- if false
this piece
should not rotate around an horizontal axisprice
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
properties
- additional properties associating a key to a value or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String information, java.lang.String[] tags, java.lang.Long creationDate, java.lang.Float grade, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, float dropOnTopElevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, int modelFlags, java.lang.Long modelSize, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, boolean horizontallyRotatable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency, java.util.Map<java.lang.String,java.lang.String> properties)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceinformation
- additional information associated to the new piecetags
- tags associated to the new piececreationDate
- creation date of the new piece in milliseconds since the epochgrade
- grade of the piece of furniture or null
icon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecedropOnTopElevation
- a percentage of the height at which should be placed
an object dropped on the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelmodelFlags
- flags which should be applied to piece modelmodelSize
- size of the 3D model of the new piececreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texturehorizontallyRotatable
- if false
this piece
should not rotate around an horizontal axisprice
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
properties
- additional properties associating a key to a value or null
public CatalogPieceOfFurniture(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String information, java.lang.String license, java.lang.String[] tags, java.lang.Long creationDate, java.lang.Float grade, Content icon, Content planIcon, Content model, float width, float depth, float height, float elevation, float dropOnTopElevation, boolean movable, java.lang.String staircaseCutOutShape, float[][] modelRotation, int modelFlags, java.lang.Long modelSize, java.lang.String creator, boolean resizable, boolean deformable, boolean texturable, boolean horizontallyRotatable, java.math.BigDecimal price, java.math.BigDecimal valueAddedTaxPercentage, java.lang.String currency, java.util.Map<java.lang.String,java.lang.String> properties, java.util.Map<java.lang.String,Content> contents)
id
- the id of the new piece or null
name
- the name of the new piecedescription
- the description of the new pieceinformation
- additional information associated to the new piecelicense
- license of the new piecetags
- tags associated to the new piececreationDate
- creation date of the new piece in milliseconds since the epochgrade
- grade of the piece of furniture or null
icon
- content of the icon of the new pieceplanIcon
- content of the icon of the new piece displayed in planmodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecedropOnTopElevation
- a percentage of the height at which should be placed
an object dropped on the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasemodelRotation
- the rotation 3 by 3 matrix applied to the piece modelmodelFlags
- flags which should be applied to piece modelmodelSize
- size of the 3D model of the new piececreator
- the creator of the modelresizable
- if true
, the size of the new piece may be editeddeformable
- if true
, the width, depth and height of the new piece may
change independently from each othertexturable
- if false
this piece should always keep the same color or texturehorizontallyRotatable
- if false
this piece
should not rotate around an horizontal axisprice
- the price of the new piece or null
valueAddedTaxPercentage
- the Value Added Tax percentage applied to the
price of the new piece or null
currency
- the price currency, noted with ISO 4217 code, or null
properties
- additional properties associating a key to a value or null
contents
- additional contents associating a key to a value or null
public CatalogPieceOfFurniture(java.lang.String name, Content icon, Content model, float width, float depth, float height, float elevation, boolean movable, boolean doorOrWindow, java.lang.Integer color, float[][] modelRotation, boolean backFaceShown, float iconYaw, boolean proportional)
doorOrWindow
parameter since a catalog door and window is supposed to be an instance
of CatalogDoorOrWindow
name
- the name of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movabledoorOrWindow
- if true
, the new piece is a door or a windowcolor
- the color of the piece as RGB code or null
if piece color is unchangedmodelRotation
- the rotation 3 by 3 matrix applied to the piece modelbackFaceShown
- true
if back face should be shown instead of front facesiconYaw
- the yaw angle used to create the piece iconproportional
- if true
, size proportions will be keptpublic CatalogPieceOfFurniture(java.lang.String name, Content icon, Content model, float width, float depth, float height, float elevation, boolean movable, java.lang.Integer color, float[][] modelRotation, boolean backFaceShown, float iconYaw, boolean proportional)
name
- the name of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablecolor
- the color of the piece as RGB code or null
if piece color is unchangedmodelRotation
- the rotation 3 by 3 matrix applied to the piece modelbackFaceShown
- true
if back face should be showniconYaw
- the yaw angle used to create the piece iconproportional
- if true
, size proportions will be keptpublic CatalogPieceOfFurniture(java.lang.String name, Content icon, Content model, float width, float depth, float height, float elevation, boolean movable, java.lang.String staircaseCutOutShape, java.lang.Integer color, float[][] modelRotation, boolean backFaceShown, float iconYaw, boolean proportional)
name
- the name of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasecolor
- the color of the piece as RGB code or null
if piece color is unchangedmodelRotation
- the rotation 3 by 3 matrix applied to the piece modelbackFaceShown
- true
if back face should be showniconYaw
- the yaw angle used to create the piece iconproportional
- if true
, size proportions will be keptpublic CatalogPieceOfFurniture(java.lang.String name, Content icon, Content model, float width, float depth, float height, float elevation, boolean movable, java.lang.String staircaseCutOutShape, java.lang.Integer color, float[][] modelRotation, boolean backFaceShown, java.lang.Long modelSize, java.lang.String creator, float iconYaw, boolean proportional)
name
- the name of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasecolor
- the color of the piece as RGB code or null
if piece color is unchangedmodelRotation
- the rotation 3 by 3 matrix applied to the piece modelbackFaceShown
- true
if back face should be shownmodelSize
- size of the 3D model of the new piececreator
- the creator of the modeliconYaw
- the yaw angle used to create the piece iconproportional
- if true
, size proportions will be keptpublic CatalogPieceOfFurniture(java.lang.String name, Content icon, Content model, float width, float depth, float height, float elevation, boolean movable, java.lang.String staircaseCutOutShape, java.lang.Integer color, float[][] modelRotation, int modelFlags, java.lang.Long modelSize, java.lang.String creator, float iconYaw, float iconPitch, float iconScale, boolean proportional)
name
- the name of the new pieceicon
- content of the icon of the new piecemodel
- content of the 3D model of the new piecewidth
- the width in centimeters of the new piecedepth
- the depth in centimeters of the new pieceheight
- the height in centimeters of the new pieceelevation
- the elevation in centimeters of the new piecemovable
- if true
, the new piece is movablestaircaseCutOutShape
- the shape used to cut out upper levels when they intersect
with the piece like a staircasecolor
- the color of the piece as RGB code or null
if piece color is unchangedmodelRotation
- the rotation 3 by 3 matrix applied to the piece modelmodelFlags
- flags which should be applied to piece modelmodelSize
- size of the 3D model of the new piececreator
- the creator of the modeliconYaw
- the yaw angle used to create the piece iconiconPitch
- the pich angle used to create the piece iconiconScale
- the scale used to create the piece iconproportional
- if true
, size proportions will be keptpublic java.lang.String getId()
null
.public java.lang.String getName()
getName
in interface CatalogItem
getName
in interface PieceOfFurniture
public java.lang.String getDescription()
null
.getDescription
in interface PieceOfFurniture
public java.lang.String getInformation()
null
.getInformation
in interface PieceOfFurniture
public java.lang.String getLicense()
null
.getLicense
in interface PieceOfFurniture
public java.lang.String[] getTags()
public java.lang.Long getCreationDate()
null
if no date is given to this piece.public java.lang.Float getGrade()
null
if no grade is given to this piece.public float getDepth()
getDepth
in interface PieceOfFurniture
public float getHeight()
getHeight
in interface PieceOfFurniture
public float getWidth()
getWidth
in interface PieceOfFurniture
public float getElevation()
getElevation
in interface PieceOfFurniture
public float getDropOnTopElevation()
getDropOnTopElevation
in interface PieceOfFurniture
public boolean isMovable()
true
if this piece of furniture is movable.isMovable
in interface PieceOfFurniture
public boolean isDoorOrWindow()
true
if this piece of furniture is a door or a window.
As this method existed before CatalogDoorOrWindow class,
you shouldn't rely on the value returned by this method to guess if a piece
is an instance of DoorOrWindow
class.isDoorOrWindow
in interface PieceOfFurniture
public Content getIcon()
getIcon
in interface CatalogItem
getIcon
in interface PieceOfFurniture
public Content getPlanIcon()
null
.getPlanIcon
in interface PieceOfFurniture
public Content getModel()
getModel
in interface PieceOfFurniture
public int getModelFlags()
getModelFlags
in interface PieceOfFurniture
public java.lang.Long getModelSize()
getModelSize
in interface PieceOfFurniture
public float[][] getModelRotation()
getModelRotation
in interface PieceOfFurniture
public java.lang.String getStaircaseCutOutShape()
getStaircaseCutOutShape
in interface PieceOfFurniture
public java.lang.String getCreator()
getCreator
in interface CatalogItem
getCreator
in interface PieceOfFurniture
public boolean isBackFaceShown()
true
if the back face of the piece of furniture
model should be displayed.isBackFaceShown
in interface PieceOfFurniture
public java.lang.Integer getColor()
getColor
in interface PieceOfFurniture
public float getIconYaw()
public float getIconPitch()
public float getIconScale()
public boolean isProportional()
true
if size proportions should be kept.public boolean isModifiable()
true
if this piece is modifiable (not read from resources).public boolean isResizable()
true
if this piece is resizable.isResizable
in interface PieceOfFurniture
public boolean isDeformable()
true
if this piece is deformable.isDeformable
in interface PieceOfFurniture
public boolean isWidthDepthDeformable()
true
if this piece is deformable.isWidthDepthDeformable
in interface PieceOfFurniture
public boolean isTexturable()
false
if this piece should always keep the same color or texture.isTexturable
in interface PieceOfFurniture
public boolean isHorizontallyRotatable()
false
if this piece should not rotate around an horizontal axis.isHorizontallyRotatable
in interface PieceOfFurniture
public java.math.BigDecimal getPrice()
null
.getPrice
in interface PieceOfFurniture
public java.math.BigDecimal getValueAddedTaxPercentage()
getValueAddedTaxPercentage
in interface PieceOfFurniture
public java.lang.String getCurrency()
null
if it has no price or default currency should be used.getCurrency
in interface PieceOfFurniture
public java.lang.String getProperty(java.lang.String name)
name
of this piece.getProperty
in interface PieceOfFurniture
null
if it doesn't exist or if it's not a string.public java.util.Collection<java.lang.String> getPropertyNames()
getPropertyNames
in interface PieceOfFurniture
public Content getContentProperty(java.lang.String name)
name
associated to this piece.getContentProperty
in interface PieceOfFurniture
null
if it doesn't exist or if it's not a content.public boolean isContentProperty(java.lang.String name)
true
if the type of given additional property is a content.isContentProperty
in interface PieceOfFurniture
public FurnitureCategory getCategory()
public boolean equals(java.lang.Object obj)
true
if this piece and the one in parameter are the same objects.
Note that, from version 3.6, two pieces of furniture can have the same name.equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(CatalogPieceOfFurniture piece)
compareTo
in interface java.lang.Comparable<CatalogPieceOfFurniture>
public boolean matchesFilter(java.lang.String filter)
true
if this piece matches the given filter
text.
Each substring of the filter
is considered as a search criterion that can match
the name, the category name, the creator, the license, the description or the tags of this piece.protected java.lang.String[] getFilterCriteria()
matchesFilter(String)
public CatalogPieceOfFurniture clone()
clone
in class java.lang.Object
© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License