public int [ ] getTenors ( int moneynessBP , int maturityInMonths ) { try { List < Integer > ret = new ArrayList <> ( ) ; for ( int tenor : getGridNodesPerMoneyness ( ) . get ( moneynessBP ) [ 1 ] ) { if ( containsEntryFor ( maturityInMonths , tenor , moneynessBP ) ) { ret . add ( tenor ) ; } } return ret . stream ( ) . mapToInt ( Integer :: intValue ) . toArray ( ) ; } catch ( NullPointerException e ) { return new int [ 0 ] ; } }
Return all valid tenors for a given moneyness and maturity .