org.smurn.jply
Class Property

java.lang.Object
  extended by org.smurn.jply.Property
Direct Known Subclasses:
ListProperty

public class Property
extends Object

Declaration of a property of an element.

Each element is defined by its properties, a vertex for example typically has at least the three properties for x, y and z.

There are two different kind of properties in PLY files, the normal ones that add a single value to an element, and list properties that add a variable length list of values to an element. The first one are declared by this class, the list properties by the sub-class ListProperty.

Some property names have a pre-defined meaning in the specification and should only be used accordingly. See ElementType for a list and a description of those properties.

All instances of this class are immutable.


Constructor Summary
Property(String name, DataType type)
          Creates an instance.
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Gets the name of this property.
 DataType getType()
          Gets the data type of this property.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Property

public Property(String name,
                DataType type)
Creates an instance.

Parameters:
name - Name of the property.
type - Data type of this property.
Throws:
NullPointerException - if name or type is null.
Method Detail

getName

public String getName()
Gets the name of this property.

Returns:
Name of this property. Is never null or empty, contains only ASCII characters.

getType

public DataType getType()
Gets the data type of this property.

Returns:
Data type of this property. Is never null.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2011. All Rights Reserved.