Package org.robwork.sdurw
Class MetricQPtr
- java.lang.Object
- 
- org.robwork.sdurw.MetricQPtr
 
- 
 public class MetricQPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
- 
- 
Constructor SummaryConstructors Constructor Description MetricQPtr()Default constructor yielding a NULL-pointer.MetricQPtr(long cPtr, boolean cMemoryOwn)MetricQPtr(MetricQ ptr)Do not take ownership of ptr.
 
 ptr can be null.
 
 The constructor is implicit on purpose.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricQ__ref__()Dereferencing operator.voiddelete()MetricQderef()The pointer stored in the object.doubledistance(Q q)The distance from the zero element to qdoubledistance(Q a, Q b)The distance from element a to b.
 booleanequals(MetricQ p)static longgetCPtr(MetricQPtr obj)MetricQgetDeref()Member access operator.booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
 ownershipintsize()The dimension of elements on which this metric operates.
 
 The returns -1 if the elements don't have a measure of dimension or
 if the metric works for elements of all dimensions.
 
- 
- 
- 
Constructor Detail- 
MetricQPtrpublic MetricQPtr(long cPtr, boolean cMemoryOwn)
 - 
MetricQPtrpublic MetricQPtr() Default constructor yielding a NULL-pointer.
 - 
MetricQPtrpublic MetricQPtr(MetricQ ptr) Do not take ownership of ptr.
 
 ptr can be null.
 
 The constructor is implicit on purpose.
 
- 
 - 
Method Detail- 
getCPtrpublic static long getCPtr(MetricQPtr obj) 
 - 
deletepublic void delete() 
 - 
derefpublic MetricQ deref() The pointer stored in the object.
 - 
__ref__public MetricQ __ref__() Dereferencing operator.
 - 
getDerefpublic MetricQ getDeref() Member access operator.
 - 
equalspublic boolean equals(MetricQ p) 
 - 
isSharedpublic boolean isShared() check if this Ptr has shared ownership or none
 ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
 
 - 
isNullpublic boolean isNull() checks if the pointer is null- Returns:
- Returns true if the pointer is null
 
 - 
distancepublic double distance(Q q) The distance from the zero element to q
 - 
distancepublic double distance(Q a, Q b) The distance from element a to b.
 - Parameters:
- a- [in] first element
- b- [in] second element
- Returns:
- the distance
 
 - 
sizepublic int size() The dimension of elements on which this metric operates.
 
 The returns -1 if the elements don't have a measure of dimension or
 if the metric works for elements of all dimensions.
 
- 
 
-