forked from Coded/SIPRP
no message
git-svn-id: https://svn.coded.pt/svn/SIPRP@409 bb69d46d-e84e-40c8-a05a-06db0d6337410'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
parent
0417d50159
commit
b6657cde83
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* MarcacaoMutableTreeNode.java
|
||||
*
|
||||
* Created on 18 de Maio de 2007, 7:02
|
||||
*
|
||||
* To change this template, choose Tools | Template Manager
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package siprp.medicina.processo.estrutura;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Frederico
|
||||
*/
|
||||
public abstract class MarcacaoMutableTreeNode extends EstruturaProcessoMutableTreeNode
|
||||
implements Comparable
|
||||
{
|
||||
protected Date data;
|
||||
|
||||
/** Creates a new instance of MarcacaoMutableTreeNode */
|
||||
public MarcacaoMutableTreeNode( Integer id, String descricao )
|
||||
{
|
||||
super( id, descricao );
|
||||
}
|
||||
|
||||
public void setData( Date data )
|
||||
{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Date getData()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
public int compareTo( Object other )
|
||||
{
|
||||
if( !( other instanceof MarcacaoMutableTreeNode ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
MarcacaoMutableTreeNode om = ( MarcacaoMutableTreeNode ) other;
|
||||
if( data == null )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if( om == null || om.getData() == null )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return getData().compareTo( om.getData() );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue