public String toConstraintString ( ) throws DapException { assert this . first != UNDEFINED && this . stride != UNDEFINED && this . stop != UNDEFINED ; if ( ( this . stop - this . first ) == 0 ) { return String . format ( "[0]" ) ; } else if ( this . stride == 1 ) { if ( ( this . stop - this . first ) == 1 ) return String . format ( "[%d]" , this . first ) ; else return String . format ( "[%d:%d]" , this . first , this . stop - 1 ) ; } else return String . format ( "[%d:%d:%d]" , this . first , this . stride , this . stop - 1 ) ; }
Convert this slice to a string suitable for use in a constraint