mathcomp.la
Class GeometricWithNumber

java.lang.Object
  extended by mathcomp.la.GeometricWithNumber
All Implemented Interfaces:
Geometric
Direct Known Subclasses:
DGNode

public class GeometricWithNumber
extends java.lang.Object
implements Geometric

This class decorates an Geometric with an int. Typically this class will be used to distinguish different dof's on the same geometrical object.

Note that this is an immutable object that is, once created, the data in the Object cannot be changed anymore.

Author:
pht

Constructor Summary
GeometricWithNumber(Geometric geo, int i)
          This constructs the ObjectWithNumber.
 
Method Summary
static boolean areEqual(java.lang.Object a, java.lang.Object b)
          Tests if the either both a and b are null or a.equals(b).
 boolean equals(java.lang.Object obj)
           
 Geometric getGeo()
          Returns value of property geo.
 int getI()
          Returns the value of property i.
 int hashCode()
           
 Node node(int i)
          Returns the i-th node.
 int nodesCount()
          Number of nodes.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometricWithNumber

public GeometricWithNumber(Geometric geo,
                           int i)

This constructs the ObjectWithNumber. Because ObjectWithNumber is immutable, this is the only point where you can set the reference and the int.

Parameters:
obj -
i -
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

areEqual

public static final boolean areEqual(java.lang.Object a,
                                     java.lang.Object b)
Tests if the either both a and b are null or a.equals(b).


hashCode

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

nodesCount

public int nodesCount()
Description copied from interface: Geometric
Number of nodes.

Specified by:
nodesCount in interface Geometric
Returns:
number of nodes

node

public Node node(int i)
Description copied from interface: Geometric
Returns the i-th node.

Specified by:
node in interface Geometric
Returns:
i-th node

getI

public int getI()
Returns the value of property i.

Returns:
value of i

getGeo

public Geometric getGeo()
Returns value of property geo.

Returns:
value of property geo