public short getDepth ( ) { if ( 0 == index ) return 0 ; if ( - 1 == depth ) { synchronized ( this ) { if ( - 1 == depth ) { TrieNode parent = getParent ( ) ; assert ( null == parent || parent . index < index ) ; depth = ( short ) ( null == parent ? 0 : ( parent . getDepth ( ) + 1 ) ) ; } } } return depth ; }
Gets depth .