signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class EmbeddedXMLConfigValidator { /** * { @ inheritDoc } * @ throws ConfigValidationException */ @ Override public void validateConfig ( ServerConfiguration configuration ) throws ConfigValidationException { } }
// Default is that drop - ins are enabled boolean dropinsEnabled = configuration . isDropinsEnabled ( ) ; // Drop - ins are enabled if ( dropinsEnabled ) { Tr . fatal ( tc , "fatal.configValidator.dropinsEnabled" ) ; // Throw exception to terminate the server throw new ConfigValidationException ( "Drop-ins enabled in e...
public class SystemUtil { /** * Gets the host name of the local machine . * @ return host name */ public static String getHostName ( ) { } }
try { return java . net . InetAddress . getLocalHost ( ) . getHostName ( ) ; } catch ( java . net . UnknownHostException _ex ) { return null ; }
public class BlockingListMaker { /** * Specify the total time to wait for the elements of the list to become available */ public BlockingListMaker < K , E > waitFor ( long time , TimeUnit unit ) { } }
this . nanoTimeout = time == 0 ? 1 : NANOSECONDS . convert ( time , unit ) ; return this ;
public class AnnotationCollectorTransform { /** * Adds a new syntax error to the source unit and then continues . * @ param message the message * @ param node the node for the error report * @ param source the source unit for the error report */ protected void addError ( String message , ASTNode node , SourceUnit...
source . getErrorCollector ( ) . addErrorAndContinue ( new SyntaxErrorMessage ( new SyntaxException ( message , node . getLineNumber ( ) , node . getColumnNumber ( ) , node . getLastLineNumber ( ) , node . getLastColumnNumber ( ) ) , source ) ) ;
public class DistanceTreeEvaluator { /** * Evaluate the goodness of fit of a given tree to the original distance * matrix . The returned value is the coefficient of variation , i . e . the * square root of the LS error normalized by the mean . * This measure can also give an estimate of the quality of the distanc...
int numSequences = matrix . getSize ( ) ; List < PhylogenyNode > externalNodes = tree . getExternalNodes ( ) ; HashMap < String , PhylogenyNode > externalNodesHashMap = new HashMap < String , PhylogenyNode > ( ) ; Set < PhylogenyNode > path = new HashSet < PhylogenyNode > ( ) ; for ( PhylogenyNode node : externalNodes ...
public class UserApi { /** * Revokes an impersonation token . Available only for admin users . * < pre > < code > GitLab Endpoint : DELETE / users / : user _ id / impersonation _ tokens / : impersonation _ token _ id < / code > < / pre > * @ param userIdOrUsername the user in the form of an Integer ( ID ) , String ...
if ( tokenId == null ) { throw new RuntimeException ( "tokenId cannot be null" ) ; } Response . Status expectedStatus = ( isApiVersion ( ApiVersion . V3 ) ? Response . Status . OK : Response . Status . NO_CONTENT ) ; delete ( expectedStatus , null , "users" , getUserIdOrUsername ( userIdOrUsername ) , "impersonation_to...
public class Aligner { /** * Performs global alignment * @ param alignmentScoring scoring system * @ param seq1 first sequence * @ param seq2 second sequence * @ return array of mutations */ public static < S extends Sequence < S > > Alignment < S > alignGlobal ( AlignmentScoring < S > alignmentScoring , S seq1...
if ( alignmentScoring instanceof AffineGapAlignmentScoring ) return alignGlobalAffine ( ( AffineGapAlignmentScoring < S > ) alignmentScoring , seq1 , seq2 ) ; if ( alignmentScoring instanceof LinearGapAlignmentScoring ) return alignGlobalLinear ( ( LinearGapAlignmentScoring < S > ) alignmentScoring , seq1 , seq2 ) ; th...
public class References { /** * wrapper for reference replacement */ static String replace ( final String text , final boolean toReference ) { } }
return toReference ? replaceWithRef ( text ) : replaceFromRef ( text ) ;
public class Tuple { /** * Adds a binding to this tuple . */ public Tuple add ( VarBindingDef binding ) { } }
if ( binding != null ) { VarDef var = binding . getVarDef ( ) ; if ( var == null ) { throw new IllegalArgumentException ( "Invalid binding=" + binding + ": variable undefined" ) ; } VarValueDef value = binding . getValueDef ( ) ; if ( value == null ) { throw new IllegalArgumentException ( "Invalid binding=" + binding +...
public class SpringComponent { /** * Gets the bean invocation return entries . */ protected Object [ ] invoke ( Object [ ] arguments ) throws InvocationTargetException , IllegalAccessException { } }
Object returnValue = invoke ( method , arguments ) ; if ( ! scatterOutput ) { logger . trace ( "Using return as is" ) ; return new Object [ ] { returnValue } ; } if ( returnValue instanceof Object [ ] ) { logger . trace ( "Scatter array return" ) ; return ( Object [ ] ) returnValue ; } if ( returnValue instanceof Colle...
public class VariationalAutoencoder { /** * Return the reconstruction error for this variational autoencoder . < br > * < b > NOTE ( important ) : < / b > This method is used ONLY for VAEs that have a standard neural network loss function ( i . e . , * an { @ link org . nd4j . linalg . lossfunctions . ILossFunction...
if ( ! hasLossFunction ( ) ) { throw new IllegalStateException ( "Cannot use reconstructionError method unless the variational autoencoder is " + "configured with a standard loss function (via LossFunctionWrapper). For VAEs utilizing a reconstruction " + "distribution, use the reconstructionProbability or reconstructio...
public class EventDestination { /** * The types of events that Amazon Pinpoint sends to the specified event destinations . * @ param matchingEventTypes * The types of events that Amazon Pinpoint sends to the specified event destinations . * @ return Returns a reference to this object so that method calls can be c...
java . util . ArrayList < String > matchingEventTypesCopy = new java . util . ArrayList < String > ( matchingEventTypes . length ) ; for ( EventType value : matchingEventTypes ) { matchingEventTypesCopy . add ( value . toString ( ) ) ; } if ( getMatchingEventTypes ( ) == null ) { setMatchingEventTypes ( matchingEventTy...
public class ApiOvhTelephony { /** * Get this object properties * REST : GET / telephony / { billingAccount } / ovhPabx / { serviceName } / hunting / queue / { queueId } * @ param billingAccount [ required ] The name of your billingAccount * @ param serviceName [ required ] * @ param queueId [ required ] */ pub...
String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/queue/{queueId}" ; StringBuilder sb = path ( qPath , billingAccount , serviceName , queueId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhOvhPabxHuntingQueue . class ) ;
public class AttrValue { /** * < pre > * This is a placeholder only used in nodes defined inside a * function . It indicates the attr value will be supplied when * the function is instantiated . For example , let us suppose a * node " N " in function " FN " . " N " has an attr " A " with value * placeholder =...
java . lang . Object ref = "" ; if ( valueCase_ == 9 ) { ref = value_ ; } if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; if ( valueCase_ == 9 ) { value_ = b ; } return b ; } else { return ( com ...
public class SolarisUtils { /** * Registers a new file extension in the operating system . * @ param fileTypeName Name of the file extension . Must be atomic , e . g . * < code > foocorp . fooapp . v1 < / code > . * @ param fileTypeExtension File extension with leading dot , e . g . * < code > . bar < / code > ...
throw new UnsupportedOperationException ( "Not supported yet." ) ;
public class VersionUtils { /** * Determine how much of two versions match . Returns null if the versions do not match at all . * @ return null for no match or the name of the most specific field that matches . */ public static Version . Field getMostSpecificMatchingField ( Version v1 , Version v2 ) { } }
if ( v1 . getMajor ( ) != v2 . getMajor ( ) ) { return null ; } if ( v1 . getMinor ( ) != v2 . getMinor ( ) ) { return Version . Field . MAJOR ; } if ( v1 . getPatch ( ) != v2 . getPatch ( ) ) { return Version . Field . MINOR ; } final Integer l1 = v1 . getLocal ( ) ; final Integer l2 = v2 . getLocal ( ) ; if ( l1 != l...
public class InternalSimpleAntlrParser { /** * InternalSimpleAntlr . g : 73:1 : entryRuleAntlrGrammar returns [ EObject current = null ] : iv _ ruleAntlrGrammar = ruleAntlrGrammar EOF ; */ public final EObject entryRuleAntlrGrammar ( ) throws RecognitionException { } }
EObject current = null ; EObject iv_ruleAntlrGrammar = null ; try { // InternalSimpleAntlr . g : 74:2 : ( iv _ ruleAntlrGrammar = ruleAntlrGrammar EOF ) // InternalSimpleAntlr . g : 75:2 : iv _ ruleAntlrGrammar = ruleAntlrGrammar EOF { if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getAntlrGramma...
public class BlobW { /** * Write blob data . * @ param b byte array to be written at current position . */ public void write ( byte [ ] b ) throws IOException { } }
if ( b != null && b . length > 0 ) { pos += blob . write ( b , 0 , pos , b . length ) ; }
public class HystrixObservableCollapser { /** * A lazy { @ link Observable } that will execute when subscribed to . * See https : / / github . com / Netflix / RxJava / wiki for more information . * @ param observeOn * The { @ link Scheduler } to execute callbacks on . * @ return { @ code Observable < R > } that...
return Observable . defer ( new Func0 < Observable < ResponseType > > ( ) { @ Override public Observable < ResponseType > call ( ) { final boolean isRequestCacheEnabled = getProperties ( ) . requestCacheEnabled ( ) . get ( ) ; /* try from cache first */ if ( isRequestCacheEnabled ) { HystrixCachedObservable < ResponseT...
public class FreePool { /** * This method should only be called when a fatal error occurs or * when an attempt is made to remove all of the connections from * the pool . */ protected void incrementFatalErrorValue ( int value1 ) { } }
/* * value1 and value2 are index values for the free pools . * When value1 and value2 are 0 , we are in free pool . */ if ( fatalErrorNotificationTime == Integer . MAX_VALUE - 1 ) { /* * We need to start over at zero . All connection * fatal error values need to be reset to zero . */ fatalErrorNotificationTime = 0 ...
public class HttpListenerMBean { protected void defineManagedResource ( ) { } }
super . defineManagedResource ( ) ; defineAttribute ( "defaultScheme" ) ; defineAttribute ( "lowOnResources" , false ) ; defineAttribute ( "outOfResources" , false ) ; defineAttribute ( "confidentialPort" ) ; defineAttribute ( "confidentialScheme" ) ; defineAttribute ( "integralPort" ) ; defineAttribute ( "integralSche...
public class CassandraStorage { /** * get a list of index expression */ private List < IndexExpression > getIndexExpressions ( ) throws IOException { } }
UDFContext context = UDFContext . getUDFContext ( ) ; Properties property = context . getUDFProperties ( AbstractCassandraStorage . class ) ; if ( property . getProperty ( PARTITION_FILTER_SIGNATURE ) != null ) return indexExpressionsFromString ( property . getProperty ( PARTITION_FILTER_SIGNATURE ) ) ; else return nul...
public class CellConverterFactorySupport { /** * 数式を処理する { @ link CellFormulaHandler } を作成する 。 * @ param formulaAnno 数式のアノテーション * @ param field フィールド情報 * @ param config システム情報 * @ return { @ link CellFormulaHandler } のインスタンス */ protected CellFormulaHandler createCellFormulaHandler ( final XlsFormula formulaAnn...
if ( ! formulaAnno . value ( ) . isEmpty ( ) ) { final String formulaExpression = formulaAnno . value ( ) ; try { // EL式として正しいか検証する config . getFormulaFormatter ( ) . interpolate ( formulaExpression , Collections . emptyMap ( ) ) ; } catch ( ExpressionEvaluationException e ) { throw new AnnotationInvalidException ( for...
public class Functions { /** * Returns the number of items in a collection or the number of characters in a string . * The collection can be of any type supported for the < code > items < / code > attribute of * the < code > & lt ; c : forEach & gt ; < / code > action . * @ param obj the collection or string whos...
if ( obj == null ) { return 0 ; } if ( obj instanceof String ) { return ( ( String ) obj ) . length ( ) ; } if ( obj instanceof Collection ) { return ( ( Collection ) obj ) . size ( ) ; } if ( obj instanceof Map ) { return ( ( Map ) obj ) . size ( ) ; } if ( obj instanceof Iterator ) { int count = 0 ; Iterator iter = (...
public class RestrictedFeatureRespository { /** * ( non - Javadoc ) * @ see com . ibm . ws . kernel . feature . resolver . FeatureResolver . Repository # getFeature ( java . lang . String ) */ @ Override public ProvisioningFeatureDefinition getFeature ( String featureName ) { } }
ProvisioningFeatureDefinition result = repo . getFeature ( featureName ) ; if ( result == null ) { return null ; } if ( restricted . contains ( result . getSymbolicName ( ) ) ) { // record the restricted attemp if ( ! restrictedAttempts . contains ( result . getSymbolicName ( ) ) ) { restrictedAttempts . add ( result ....
public class InboundHeadersBenchmark { /** * Checkstyle . */ @ Benchmark @ BenchmarkMode ( Mode . AverageTime ) @ OutputTimeUnit ( TimeUnit . NANOSECONDS ) public void defaultHeaders_serverHandler ( Blackhole bh ) { } }
serverHandler ( bh , new DefaultHttp2Headers ( true , 9 ) ) ;
public class NativeJavaObject { /** * Type - munging for field setting and method invocation . * Conforms to LC3 specification */ static Object coerceTypeImpl ( Class < ? > type , Object value ) { } }
if ( value != null && value . getClass ( ) == type ) { return value ; } switch ( getJSTypeCode ( value ) ) { case JSTYPE_NULL : // raise error if type . isPrimitive ( ) if ( type . isPrimitive ( ) ) { reportConversionError ( value , type ) ; } return null ; case JSTYPE_UNDEFINED : if ( type == ScriptRuntime . StringCla...
public class KafkaSimpleStreamingExtractor { /** * Get the schema ( metadata ) of the extracted data records . * @ return the schema of Kafka topic being extracted * @ throws IOException if there is problem getting the schema */ @ Override public S getSchema ( ) throws IOException { } }
try { if ( _schemaRegistry . isPresent ( ) ) { return _schemaRegistry . get ( ) . getLatestSchemaByTopic ( this . _partition . topic ( ) ) ; } } catch ( SchemaRegistryException e ) { throw new RuntimeException ( e ) ; } return ( ( S ) this . _partition . topic ( ) ) ;
public class BlockResettableMutableObjectIterator { @ Override public T next ( T target ) throws IOException { } }
// check for the left over element if ( this . readPhase ) { return getNextRecord ( target ) ; } else { // writing phase . check for leftover first if ( this . leftOverReturned ) { // get next record if ( ( target = this . input . next ( target ) ) != null ) { if ( writeNextRecord ( target ) ) { return target ; } else ...
public class Log4JConfigurer { /** * Called during Logging init , potentially resets log4j to follow the settings * configured by pelzer . util . */ static void configureLog4j ( ) { } }
org . apache . log4j . LogManager . resetConfiguration ( ) ; org . apache . log4j . Logger . getRootLogger ( ) . addAppender ( new org . apache . log4j . Appender ( ) { private String name ; @ Override public void setName ( String name ) { this . name = name ; } @ Override public void setLayout ( org . apache . log4j ....
public class AuthenticateUserHelper { /** * Validate that the input parameters are not null . * @ param authenticationService the service to authenticate a user * @ param username the user to authenticate * @ throws AuthenticationException when either input is null */ private void validateInput ( AuthenticationSe...
if ( authenticationService == null ) { throw new AuthenticationException ( "authenticationService cannot be null." ) ; } else if ( username == null ) { throw new AuthenticationException ( "username cannot be null." ) ; }
public class SniffyServlet { /** * TODO : stream JSON instead ; otherwise we are creating unnecessary garbage out of interned strings mostly */ private byte [ ] getRequestStatsJson ( String requestId ) { } }
RequestStats requestStats = cache . get ( requestId ) ; if ( null != requestStats ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "{" ) . append ( "\"timeToFirstByte\":" ) . append ( requestStats . getTimeToFirstByte ( ) ) . append ( "," ) . append ( "\"time\":" ) . append ( requestStats . getElapsedTime (...
public class JCalendar { /** * Sets the foreground color . * @ param fg * the new foreground */ public void setForeground ( Color fg ) { } }
super . setForeground ( fg ) ; if ( dayChooser != null ) { dayChooser . setForeground ( fg ) ; monthChooser . setForeground ( fg ) ; yearChooser . setForeground ( fg ) ; }
public class SessionDataManager { /** * Reindex same - name siblings of the node Reindex is actual for remove , move only . If node is * added then its index always is a last in list of childs . * @ param cause * a node caused reindexing , i . e . deleted or moved node . */ protected List < ItemState > reindexSam...
List < ItemState > changes = new ArrayList < ItemState > ( ) ; NodeData parentNodeData = ( NodeData ) dataManager . getItemData ( cause . getParentIdentifier ( ) ) ; NodeData nextSibling = ( NodeData ) dataManager . getItemData ( parentNodeData , new QPathEntry ( cause . getQPath ( ) . getName ( ) , cause . getQPath ( ...
public class DateTimeStaticExtensions { /** * Parse text into a { @ link java . time . LocalDateTime } using the provided pattern . * Note : the order of parameters differs from versions of this method for the legacy Date class . * @ param type placeholder variable used by Groovy categories ; ignored for default st...
return LocalDateTime . parse ( text , DateTimeFormatter . ofPattern ( pattern ) ) ;
public class XmlSoapFaultValidator { /** * Delegates to XML message validator for validation of fault detail . */ @ Override protected void validateFaultDetailString ( String receivedDetailString , String controlDetailString , TestContext context , ValidationContext validationContext ) throws ValidationException { } }
XmlMessageValidationContext xmlMessageValidationContext ; if ( validationContext instanceof XmlMessageValidationContext ) { xmlMessageValidationContext = ( XmlMessageValidationContext ) validationContext ; } else { xmlMessageValidationContext = new XmlMessageValidationContext ( ) ; } messageValidator . validateMessage ...
public class RESTAssert { /** * assert that objects are equal . < br > * This means they are both < i > null < / i > or < code > one . equals ( two ) < / code > returns < i > true < / i > * @ param one the first object * @ param two the second object * @ param status the status code to throw * @ throws WebApp...
if ( ( one == null ) && ( two == null ) ) { return ; } RESTAssert . assertNotNull ( one , status ) ; RESTAssert . assertTrue ( one . equals ( two ) , status ) ;
public class GuaranteedTargetStream { /** * Is the stream marked as blocked . * @ return true if the stream is blocked . */ private boolean isStreamBlocked ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "isStreamBlocked" ) ; SibTr . exit ( tc , "isStreamBlocked" , new Object [ ] { Boolean . valueOf ( isStreamBlocked ) , Long . valueOf ( linkBlockingTick ) } ) ; } return this . isStreamBlocked ;
public class CassandraSchemaManager { /** * showSchema Alters column type of an existing column . * @ param tableInfo * the table info * @ param translator * the translator * @ param column * the column * @ throws Exception * the exception */ private void alterColumnType ( TableInfo tableInfo , CQLTrans...
StringBuilder alterColumnTypeQuery = new StringBuilder ( "ALTER TABLE " ) ; translator . ensureCase ( alterColumnTypeQuery , tableInfo . getTableName ( ) , false ) ; alterColumnTypeQuery . append ( " ALTER " ) ; translator . ensureCase ( alterColumnTypeQuery , column . getColumnName ( ) , false ) ; alterColumnTypeQuery...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link MrowType } { @ code > } } */ @ XmlElementDecl ( namespace = "http://www.w3.org/1998/Math/MathML" , name = "mrow" ) public JAXBElement < MrowType > createMrow ( MrowType value ) { } }
return new JAXBElement < MrowType > ( _Mrow_QNAME , MrowType . class , null , value ) ;
public class FieldFacetProvider { private static void collectFields ( Class < ? > type , List < Field > fields ) { } }
final Field [ ] declaredFields = type . getDeclaredFields ( ) ; for ( Field declaredField : declaredFields ) { if ( isPersistable ( declaredField ) ) { fields . add ( declaredField ) ; } } if ( type . getSuperclass ( ) != null ) { collectFields ( type . getSuperclass ( ) , fields ) ; }
public class ActionFormMapper { protected Object prepareYourCollection ( VirtualForm virtualForm , Object bean , String name , Object value , StringBuilder pathSb , FormMappingOption option , PropertyDesc pd ) { } }
final List < FormYourCollectionResource > yourCollections = option . getYourCollections ( ) ; if ( yourCollections . isEmpty ( ) ) { return null ; // no settings of your collections } final Class < ? > propertyType = pd . getPropertyType ( ) ; for ( FormYourCollectionResource yourCollection : yourCollections ) { if ( !...
public class ParameterParser { /** * Parses out a token until any of the given terminators is encountered . * @ param terminators the array of terminating characters . Any of these characters when encountered signify the end * of the token * @ return the token */ private String parseToken ( final char [ ] termina...
char ch ; i1 = pos ; i2 = pos ; while ( hasChar ( ) ) { ch = chars [ pos ] ; if ( isOneOf ( ch , terminators ) ) { break ; } i2 ++ ; pos ++ ; } return getToken ( false ) ;
public class AuthenticationAjaxFilter { /** * / * ( non - Javadoc ) * @ see org . directwebremoting . AjaxFilter # doFilter ( java . lang . Object , java . lang . reflect . Method , java . lang . Object [ ] , org . directwebremoting . AjaxFilterChain ) */ public Object doFilter ( Object object , Method method , Objec...
// We allow anyone to authenticate if ( authenticateName . equals ( method . getName ( ) ) ) { return chain . doFilter ( object , method , params ) ; } Object user = getUser ( ) ; if ( user != null ) { return chain . doFilter ( object , method , params ) ; } throw new SecurityException ( "Not authenticated" ) ;
public class Task { /** * Set a start value . * @ param index start index ( 1-10) * @ param value start value */ public void setStart ( int index , Date value ) { } }
set ( selectField ( TaskFieldLists . CUSTOM_START , index ) , value ) ;
public class CPInstancePersistenceImpl { /** * Returns an ordered range of all the cp instances where CPDefinitionId = & # 63 ; and displayDate & lt ; & # 63 ; and status = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < co...
return findByC_LtD_S ( CPDefinitionId , displayDate , status , start , end , orderByComparator , true ) ;
public class CmsHtmlWidget { /** * Returns the editor widget to use depending on the current users settings , current browser and installed editors . < p > * @ param cms the current CmsObject * @ param widgetDialog the dialog where the widget is used on * @ return the editor widget to use depending on the current...
if ( m_editorWidget == null ) { // get HTML widget to use from editor manager String widgetClassName = OpenCms . getWorkplaceManager ( ) . getWorkplaceEditorManager ( ) . getWidgetEditor ( cms . getRequestContext ( ) , widgetDialog . getUserAgent ( ) ) ; boolean foundWidget = true ; if ( CmsStringUtil . isEmpty ( widge...
public class ContainerBase { /** * Adds the specified { @ link File } resource ( a nested JAR File form ) to the current archive , returning the archive * itself * @ param resource * @ param target * @ return * @ throws IllegalArgumentException */ private T addNestedJarFileResource ( final File resource , fin...
final Iterable < ClassLoader > classLoaders = ( ( Configurable ) this . getArchive ( ) ) . getConfiguration ( ) . getClassLoaders ( ) ; for ( final ClassLoader classLoader : classLoaders ) { final InputStream in = classLoader . getResourceAsStream ( resourceAdjustedPath ( resource ) ) ; if ( in != null ) { final Asset ...
public class AbstractCryptor { /** * Factory method for creating a new { @ link Cipher } from the given private key . This method is * invoked in the constructor from the derived classes and can be overridden so users can * provide their own version of a new { @ link Cipher } from the given private key . * @ para...
return newCipher ( key , newAlgorithm ( ) , newSalt ( ) , newIterationCount ( ) , newOperationMode ( ) ) ;
public class CommerceCurrencyPersistenceImpl { /** * Returns the first commerce currency in the ordered set where uuid = & # 63 ; . * @ param uuid the uuid * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the first matching commerce currency * @ t...
CommerceCurrency commerceCurrency = fetchByUuid_First ( uuid , orderByComparator ) ; if ( commerceCurrency != null ) { return commerceCurrency ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; msg . append ( uuid ) ; msg . append ( "}" ) ; throw new...
public class Configuration { /** * This method forces specific devices to be used . All other devices present in system will be ignored . * @ param devices * @ return */ public Configuration useDevices ( @ NonNull int ... devices ) { } }
List < Integer > usableDevices = new ArrayList < > ( ) ; for ( int device : devices ) { if ( ! availableDevices . contains ( device ) ) { log . warn ( "Non-existent device [{}] requested, ignoring..." , device ) ; } else { if ( ! usableDevices . contains ( device ) ) usableDevices . add ( device ) ; } } if ( usableDevi...
public class GroovyEngine { /** * Initialize the engine . */ public void initialize ( BSFManager mgr , String lang , Vector declaredBeans ) throws BSFException { } }
super . initialize ( mgr , lang , declaredBeans ) ; // create a shell shell = new GroovyShell ( mgr . getClassLoader ( ) ) ; // register the mgr with object name " bsf " shell . setVariable ( "bsf" , new BSFFunctions ( mgr , this ) ) ; int size = declaredBeans . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { declareB...
public class CheckableGroup { /** * Set the specified { @ link Checkable } { @ link Widget } as unchecked , if it is a child of this * { @ link CheckableGroup } and not already unchecked . * @ param checkableWidget The { @ code Checkable Widget } to * { @ linkplain Checkable # setChecked ( boolean ) set unchecked...
if ( hasChild ( checkableWidget ) ) { return checkInternal ( checkableWidget , false ) ; } return false ;
public class A_CmsListResourceCollector { /** * Returns a list item created from the resource information , differs between valid resources and invalid resources . < p > * @ param resource the resource to create the list item from * @ param list the list * @ param showPermissions if to show permissions * @ para...
CmsListItem item = list . newItem ( resource . getStructureId ( ) . toString ( ) ) ; // get an initialized resource utility CmsResourceUtil resUtil = getWp ( ) . getResourceUtil ( ) ; resUtil . setResource ( resource ) ; item . set ( A_CmsListExplorerDialog . LIST_COLUMN_NAME , resUtil . getPath ( ) ) ; item . set ( A_...
public class Application { /** * Factory method for Application list . Returns a list of Application object with page and size preferences * Allow different Client implementaitons * @ param client the client * @ param page the page * @ param size the page size * @ return the list * @ throws IOException unex...
final String applicationUri = client . getUserResourceUri ( BandwidthConstants . APPLICATIONS_URI_PATH ) ; final ResourceList < Application > applications = new ResourceList < Application > ( page , size , applicationUri , Application . class ) ; applications . setClient ( client ) ; applications . initialize ( ) ; ret...
public class AbstractOption { /** * Gets whether the name is valid or not . * @ param optionName the name of the option * @ return true if the name that not contain any illegal character */ public static boolean nameIsLegal ( String optionName ) { } }
for ( char illegalChar : illegalNameCharacters ) { if ( optionName . indexOf ( illegalChar ) >= 0 ) { return false ; } } return true ;
public class GestureController { public boolean onInterceptTouch ( @ NonNull View view , @ NonNull MotionEvent event ) { } }
isInterceptTouchCalled = true ; return onTouchInternal ( view , event ) ;
public class Paging { /** * / * package */ HttpParameter [ ] asPostParameterArray ( ) { } }
List < HttpParameter > list = asPostParameterList ( SMCP , COUNT ) ; if ( list . size ( ) == 0 ) { return NULL_PARAMETER_ARRAY ; } return list . toArray ( new HttpParameter [ list . size ( ) ] ) ;
public class FactoryMultiView { /** * Creates an estimator for the PnP problem that uses only three observations , which is the minimal case * and known as P3P . * < p > NOTE : Observations are in normalized image coordinates NOT pixels . < / p > * @ param which The algorithm which is to be returned . * @ param...
MotionTransformPoint < Se3_F64 , Point3D_F64 > motionFit = FitSpecialEuclideanOps_F64 . fitPoints3D ( ) ; switch ( which ) { case P3P_GRUNERT : P3PGrunert grunert = new P3PGrunert ( PolynomialOps . createRootFinder ( 5 , RootFinderType . STURM ) ) ; return new WrapP3PLineDistance ( grunert , motionFit ) ; case P3P_FINS...
public class Chart { /** * Specify animation easing * Default value is { @ link org . dashbuilder . renderer . chartjs . lib . options . Type # EASE _ OUT _ QUART } * @ param type */ public void setAnimationType ( Type type ) { } }
if ( type == null ) options . clearProperty ( ANIMATION_EASING ) ; else options . setProperty ( ANIMATION_EASING , type . getValue ( ) ) ;
public class CacheManagerFactory { /** * Resets the cache manager for a resource type * @ param config * the jawr config * @ param resourceType * the resource type * @ return the cache manager for a resource type */ public static synchronized JawrCacheManager resetCacheManager ( JawrConfig config , String res...
String cacheMgrAttributeName = CACHE_ATTR_PREFIX + resourceType . toUpperCase ( ) + CACHE_ATTR_SUFFIX ; JawrCacheManager cacheManager = ( JawrCacheManager ) config . getContext ( ) . getAttribute ( cacheMgrAttributeName ) ; if ( cacheManager != null ) { cacheManager . clear ( ) ; config . getContext ( ) . removeAttribu...
public class RelatedTablesCoreExtension { /** * Returns the relationships defined through this extension * @ return a list of ExtendedRelation objects */ public List < ExtendedRelation > getRelationships ( ) { } }
List < ExtendedRelation > result = null ; try { if ( extendedRelationsDao . isTableExists ( ) ) { result = extendedRelationsDao . queryForAll ( ) ; } else { result = new ArrayList < > ( ) ; } } catch ( SQLException e ) { throw new GeoPackageException ( "Failed to query for relationships " + "in " + EXTENSION_NAME , e )...
public class UpdateTypedLinkFacetRequest { /** * Attributes update structure . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setAttributeUpdates ( java . util . Collection ) } or { @ link # withAttributeUpdates ( java . util . Collection ) } if you * want...
if ( this . attributeUpdates == null ) { setAttributeUpdates ( new java . util . ArrayList < TypedLinkFacetAttributeUpdate > ( attributeUpdates . length ) ) ; } for ( TypedLinkFacetAttributeUpdate ele : attributeUpdates ) { this . attributeUpdates . add ( ele ) ; } return this ;
public class BsonObjectTraversingParser { /** * / * Public API , traversal */ @ Override public JsonToken nextToken ( ) throws IOException { } }
if ( nextToken != null ) { _currToken = nextToken ; nextToken = null ; return _currToken ; } // are we to descend to a container child ? if ( startContainer ) { startContainer = false ; // minor optimization : empty containers can be skipped if ( ! nodeCursor . currentHasChildren ( ) ) { _currToken = ( _currToken == Js...
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Creates a new cp definition option value rel with the primary key . Does not add the cp definition option value rel to the database . * @ param CPDefinitionOptionValueRelId the primary key for the new cp definition option value rel * @ return the new cp...
CPDefinitionOptionValueRel cpDefinitionOptionValueRel = new CPDefinitionOptionValueRelImpl ( ) ; cpDefinitionOptionValueRel . setNew ( true ) ; cpDefinitionOptionValueRel . setPrimaryKey ( CPDefinitionOptionValueRelId ) ; String uuid = PortalUUIDUtil . generate ( ) ; cpDefinitionOptionValueRel . setUuid ( uuid ) ; cpDe...
public class DMRDriver { /** * Returns a { @ link List } of objects extracted from the given { @ code nodeList } * @ param nodeList the source list to extract the result values from * @ return a { @ link List } of objects extracted from the given { @ code nodeList } * @ throws ProtocolException */ private static ...
if ( nodeList . isEmpty ( ) ) { return Collections . emptyList ( ) ; } else { ArrayList < Object > result = new ArrayList < > ( nodeList . size ( ) ) ; for ( ModelNode node : nodeList ) { if ( node . hasDefined ( JBossASClient . RESULT ) ) { result . add ( toObject ( node . get ( JBossASClient . RESULT ) ) ) ; } else {...
public class NameSpace { /** * Gets the package . * @ return the package */ String getPackage ( ) { } }
if ( this . packageName != null ) return this . packageName ; if ( this . parent != null ) return this . parent . getPackage ( ) ; return null ;
public class JDBCDatabaseMetaData { /** * ( JDBC4 clarification : ) * Retrieves a description of the foreign key columns in the given foreign key * table that reference the primary key or the columns representing a unique constraint of the parent table ( could be the same or a different table ) . * The number of ...
if ( parentTable == null ) { throw Util . nullArgument ( "parentTable" ) ; } if ( foreignTable == null ) { throw Util . nullArgument ( "foreignTable" ) ; } parentSchema = translateSchema ( parentSchema ) ; foreignSchema = translateSchema ( foreignSchema ) ; StringBuffer select = toQueryPrefix ( "SYSTEM_CROSSREFERENCE" ...
public class AgentAttacher { /** * The problem with different stagemonitor versions is that a class like { @ link javax . xml . ws . Binding } , which is * loaded by the bootstrap class loader can be used by multiple applications . * < p > If those applications are using different versions of stagemonitor they migh...
final String stagemonitorVersionKey = "stagemonitor.version" ; final String stagemonitorClassLoaderKey = "stagemonitor.classLoader" ; final String alreadyRegisteredVersion = System . getProperty ( stagemonitorVersionKey ) ; final String currentVersion = corePlugin . getVersion ( ) ; if ( alreadyRegisteredVersion != nul...
public class Matrix3 { /** * Sets all of the matrix ' s components at once . * @ return a reference to this matrix , for chaining . */ public Matrix3 set ( double m00 , double m10 , double m20 , double m01 , double m11 , double m21 , double m02 , double m12 , double m22 ) { } }
this . m00 = m00 ; this . m01 = m01 ; this . m02 = m02 ; this . m10 = m10 ; this . m11 = m11 ; this . m12 = m12 ; this . m20 = m20 ; this . m21 = m21 ; this . m22 = m22 ; return this ;
public class SQLiteQueryBuilder { /** * Perform a query by combining all current settings and the * information passed into this method . * @ param db the database to query on * @ param projectionIn A list of which columns to return . Passing * null will return all columns , which is discouraged to prevent * ...
if ( mTables == null ) { return null ; } if ( mStrict && selection != null && selection . length ( ) > 0 ) { // Validate the user - supplied selection to detect syntactic anomalies // in the selection string that could indicate a SQL injection attempt . // The idea is to ensure that the selection clause is a valid SQL ...
public class ClusKernel { /** * Overwrites the LS , SS and weightedN in this cluster to the values of the * given cluster but adds N and classCount of the given cluster to this one . * This function is useful when the weight of an entry becomes to small , and * we want to forget the information of the old points ...
this . totalN = other . totalN ; this . N = other . N ; // AuxiliaryFunctions . overwriteDoubleArray ( this . LS , other . LS ) ; // AuxiliaryFunctions . overwriteDoubleArray ( this . SS , other . SS ) ; assert ( LS . length == other . LS . length ) ; System . arraycopy ( other . LS , 0 , LS , 0 , LS . length ) ; asser...
public class AppVersionService { /** * Returns the list of distinct versions for the given application sorted in * reverse chronological order * @ param cluster * @ param user * @ param appId * @ return the list of versions sorted in reverse chronological order ( the * list will be empty if no versions are ...
Get get = new Get ( getRowKey ( cluster , user , appId ) ) ; List < VersionInfo > versions = Lists . newArrayList ( ) ; Long ts = 0L ; Table versionsTable = null ; try { versionsTable = hbaseConnection . getTable ( TableName . valueOf ( Constants . HISTORY_APP_VERSION_TABLE ) ) ; Result r = versionsTable . get ( get ) ...
public class Scan { /** * Scans the named class file for uses of deprecated APIs . * @ param fileName the class file to scan * @ return true on success , false on failure */ public boolean processClassFile ( String fileName ) { } }
Path path = Paths . get ( fileName ) ; try { ClassFile cf = ClassFile . read ( path ) ; processClass ( cf ) ; return true ; } catch ( NoSuchFileException nsfe ) { errorNoFile ( fileName ) ; } catch ( IOException | ConstantPoolException ex ) { errorException ( ex ) ; } return false ;
public class N { /** * Removes the first occurrence of the specified element from the specified * array . All subsequent elements are shifted to the left ( subtracts one * from their indices ) . If the array doesn ' t contains such an element , no * elements are removed from the array . * This method returns a ...
if ( N . isNullOrEmpty ( a ) ) { return a ; } int index = indexOf ( a , 0 , element ) ; return index == INDEX_NOT_FOUND ? a . clone ( ) : delete ( a , index ) ;
public class CollectionHelper { /** * new array list from iterable . * @ param iterables iterables to add to array list * @ return hash set */ @ SafeVarargs public static < T > ArrayList < T > newArrayList ( final Iterable < T > ... iterables ) { } }
final ArrayList < T > resultList = newArrayList ( ) ; for ( final Iterable < T > oneIterable : iterables ) { for ( final T oneElement : oneIterable ) { resultList . add ( oneElement ) ; } } return resultList ;
public class InputPanel { /** * Adds the xml description of the panels content to the StringBuilder . * Errors which occur during the xml transformation will be added to the * ConfigVerification . * @ param builder * Reference to a StringBuilder object * @ param errors * Reference to the ConfigVerification ...
SurrogateModes surMode = controller . getSurrogates ( ) ; String wikiEncoding = encodingField . getText ( ) ; if ( wikiEncoding . length ( ) == 0 ) { errors . add ( new ConfigItem ( ConfigItemTypes . WARNING , ConfigErrorKeys . MISSING_VALUE , "The CharacterEncoding was not set." ) ) ; } builder . append ( "\t<input>\r...
public class CacheMapUtil { /** * retrieval all the values in the cache list * @ return the whole list if exists or null if the key does not exist . */ public static Maybe < List < String > > values ( CacheConfigBean cacheConfigBean , String key ) { } }
return SingleRxXian . call ( CacheService . CACHE_SERVICE , "cacheMapValues" , new JSONObject ( ) { { put ( "cacheConfig" , cacheConfigBean ) ; put ( "key" , key ) ; } } ) . flatMapMaybe ( unitResponse -> { unitResponse . throwExceptionIfNotSuccess ( ) ; if ( unitResponse . getData ( ) == null ) return Maybe . empty ( ...
public class CommonExprTransformer { /** * < p > transformArgs . < / p > * @ param args an array of { @ link ameba . db . dsl . QueryExprMeta . Val } objects . * @ return array { @ link java . lang . Object } object . */ public static Object [ ] transformArgs ( Val < Expression > [ ] args ) { } }
Object [ ] objects = new Object [ args . length ] ; for ( int i = 0 ; i < args . length ; i ++ ) { objects [ i ] = args [ i ] . object ( ) ; } return objects ;
public class RegistrationResource { /** * Create a new user . * If a { @ link Person } is found , convert that object to a { @ link User } object . * Do not auto - create a new user . * @ param securityContext * @ param credentialKey * @ param credentialValue * @ param propertySet * @ param confKey * @ ...
return createUser ( securityContext , credentialKey , credentialValue , propertySet , false , confKey ) ;
public class ConfigurationBuilder { /** * Returns the Moore ' s law multiplier we ' re using for getDefaultGuessTypes ( ) . * We will only return a multiplier greater than 1 if it has been more than year since we ' ve updated the constants . * The date for this function is : 2018-08-01 * @ return the Moore ' s La...
double years = ( System . currentTimeMillis ( ) - START ) / YEAR ; // Only use the multiplier if we haven ' t updated the value date in over a year . if ( years <= 1d ) { years = 0 ; } // the multiplier for Moore ' s law is 2 to the power of ( years / 2) return BigDecimal . valueOf ( Math . pow ( 2d , years / 2d ) ) ;
public class NetscapeCertTypeExtension { /** * Get the attribute value . */ public Boolean get ( String name ) throws IOException { } }
return Boolean . valueOf ( isSet ( getPosition ( name ) ) ) ;
public class EnvironmentSettingsInner { /** * Get environment setting . * @ param resourceGroupName The name of the resource group . * @ param labAccountName The name of the lab Account . * @ param labName The name of the lab . * @ param environmentSettingName The name of the environment Setting . * @ param e...
return ServiceFuture . fromResponse ( getWithServiceResponseAsync ( resourceGroupName , labAccountName , labName , environmentSettingName , expand ) , serviceCallback ) ;
public class LdapUtils { /** * Execute search operation . * @ param connectionFactory the connection factory * @ param baseDn the base dn * @ param filter the filter * @ param binaryAttributes the binary attributes * @ param returnAttributes the return attributes * @ return the response * @ throws LdapExc...
try ( val connection = createConnection ( connectionFactory ) ) { val searchOperation = new SearchOperation ( connection ) ; val request = LdapUtils . newLdaptiveSearchRequest ( baseDn , filter , binaryAttributes , returnAttributes ) ; request . setReferralHandler ( new SearchReferralHandler ( ) ) ; return searchOperat...
public class ByteUtils { /** * Converts a hexadecimal string into byte array . * @ param hexStr * a hexadecimal string * @ return byte array * @ throws IllegalArgumentException * if hexadecimal string is invalid */ public static byte [ ] fromHexString ( String hexStr ) { } }
if ( ! hexStr . matches ( "^[0-9A-Fa-f]*$" ) ) throw new IllegalArgumentException ( "Invalid hexadecimal string" ) ; if ( hexStr . isEmpty ( ) ) return new byte [ 0 ] ; int complementary = hexStr . length ( ) % 2 ; if ( complementary != 0 ) hexStr += "0" ; return rjust ( new BigInteger ( hexStr , 16 ) . toByteArray ( )...
public class SessionConfigurationException { /** * Converts a Throwable to a SessionConfigurationException . If the Throwable is a * SessionConfigurationException , it will be passed through unmodified ; otherwise , it will be wrapped * in a new SessionConfigurationException . * @ param cause the Throwable to con...
return ( cause instanceof SessionConfigurationException ) ? ( SessionConfigurationException ) cause : new SessionConfigurationException ( cause ) ;
public class AddressTemplate { /** * Appends the specified template to this template and returns a new template . If the specified template does * not start with a slash , " / " is automatically appended . * @ param template the template to append ( makes no difference whether it starts with " / " or not ) * @ re...
String slashTemplate = template . startsWith ( "/" ) ? template : "/" + template ; return AddressTemplate . of ( this . template + slashTemplate ) ;
public class WalkModFacade { /** * Sets an specific reader for an specific chain . * @ param chain * Chain to apply the writer * @ param type * Reader type to set * @ param path * Reader path to set * @ param recursive * If to set the reader to all the submodules . * @ param params * Reader paramete...
if ( ( type != null && ! "" . equals ( type . trim ( ) ) ) || ( path != null && ! "" . equals ( path . trim ( ) ) ) ) { long startTime = System . currentTimeMillis ( ) ; Exception exception = null ; if ( ! cfg . exists ( ) ) { init ( ) ; } userDir = new File ( System . getProperty ( "user.dir" ) ) . getAbsolutePath ( )...
public class WrongStepServerInterceptor { /** * { @ inheritDoc } */ @ Override public void preparePaint ( final Request request ) { } }
// Increment the step counter UIContext uic = UIContextHolder . getCurrent ( ) ; StepCountUtil . incrementSessionStep ( uic ) ; super . preparePaint ( request ) ;
public class Util { /** * Creates a string of given length where each character comes from a * set of values 0-9 followed by A - Z . * @ param length returned string will be this long . Less than 1k + 1 * @ param maxVal maximum ordinal value of characters . If < than 0, * return null . If > 35 , 35 is used inst...
if ( length < 0 ) { return null ; } length = Math . min ( length , 1025 ) ; if ( maxVal < 0 ) { return null ; } maxVal = Math . min ( maxVal , 35 ) ; StringBuffer res = new StringBuffer ( ) ; Random rand = new Random ( ) ; for ( int i = 0 ; i <= length ; i ++ ) { res . append ( randChars [ rand . nextInt ( maxVal + 1 )...
public class AbstractCatchEventBuilder { /** * Sets an event definition for the timer with a time date . * @ param timerDate the time date of the timer * @ return the builder object */ public B timerWithDate ( String timerDate ) { } }
TimeDate timeDate = createInstance ( TimeDate . class ) ; timeDate . setTextContent ( timerDate ) ; TimerEventDefinition timerEventDefinition = createInstance ( TimerEventDefinition . class ) ; timerEventDefinition . setTimeDate ( timeDate ) ; element . getEventDefinitions ( ) . add ( timerEventDefinition ) ; return my...
public class Combinatorics { /** * Returns all the possible combinations of the set . * @ param elements * @ param subsetSize * @ param < T > * @ return */ public static < T > Set < Set < T > > combinations ( Set < T > elements , int subsetSize ) { } }
return combinationsStream ( elements , subsetSize ) . collect ( Collectors . toSet ( ) ) ;
public class RaftServiceContext { /** * Executes the given query on the state machine . * @ param index The index of the query . * @ param sequence The query sequence number . * @ param timestamp The timestamp of the query . * @ param session The session that submitted the query . * @ param operation The quer...
CompletableFuture < OperationResult > future = new CompletableFuture < > ( ) ; executeQuery ( index , sequence , timestamp , session , operation , future ) ; return future ;
public class ModelsImpl { /** * Get All Entity Roles for a given entity . * @ param appId The application ID . * @ param versionId The version ID . * @ param hEntityId The hierarchical entity extractor ID . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws ErrorResponseEx...
return getHierarchicalEntityRolesWithServiceResponseAsync ( appId , versionId , hEntityId ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CeProcessingSchedulerImpl { /** * This method is stopping all the workers giving them a delay before killing them . */ @ Override public void stopScheduling ( ) { } }
LOG . debug ( "Stopping compute engine" ) ; // Requesting all workers to stop for ( ChainingCallback chainingCallback : chainingCallbacks ) { chainingCallback . stop ( false ) ; } // Workers have 40s to gracefully stop processing tasks long until = System . currentTimeMillis ( ) + gracefulStopTimeoutInMs ; LOG . info (...
public class SVGParser { /** * supported if we are to render this element */ private static Set < String > parseRequiredFeatures ( String val ) { } }
TextScanner scan = new TextScanner ( val ) ; HashSet < String > result = new HashSet < > ( ) ; while ( ! scan . empty ( ) ) { String feature = scan . nextToken ( ) ; if ( feature . startsWith ( FEATURE_STRING_PREFIX ) ) { result . add ( feature . substring ( FEATURE_STRING_PREFIX . length ( ) ) ) ; } else { // Not a fe...
public class MemMeter { /** * { @ inheritDoc } */ @ Override public double getValue ( ) { } }
final Runtime runtime = Runtime . getRuntime ( ) ; memAlreadyUsed = memAlreadyUsed + runtime . totalMemory ( ) - runtime . freeMemory ( ) ; return new BigDecimal ( memAlreadyUsed , MathContext . DECIMAL128 ) . divide ( new BigDecimal ( scale . getNumberOfBytes ( ) ) , MathContext . DECIMAL128 ) . doubleValue ( ) ;
public class VdmEvaluationAction { /** * IEditorActionDelegate */ public void setActiveEditor ( IAction action , IEditorPart targetEditor ) { } }
if ( targetEditor instanceof VdmEditor ) { setEditor ( ( VdmEditor ) targetEditor ) ; } else { setEditor ( null ) ; }
public class Bootstrap { /** * Helper method to load a list of DNS SRV records . * @ param serviceName the service to locate . * @ param ctx the directory context to fetch from . * @ return the list of dns records * @ throws NamingException if something goes wrong during the load process . */ static List < Stri...
Attributes attrs = ctx . getAttributes ( serviceName , new String [ ] { "SRV" } ) ; NamingEnumeration < ? > servers = attrs . get ( "srv" ) . getAll ( ) ; List < String > records = new ArrayList < String > ( ) ; while ( servers . hasMore ( ) ) { DnsRecord record = DnsRecord . fromString ( ( String ) servers . next ( ) ...
public class CronOption { @ Override public OptionalThing < LaJobNote > getJobNote ( ) { } }
final LaJobNote note = ( jobTitle != null || jobDesc != null ) ? LaJobNote . of ( jobTitle , jobDesc ) : null ; return OptionalThing . ofNullable ( note , ( ) -> { throw new IllegalStateException ( "Not found the job note (both title and description)." ) ; } ) ;