idx
int64
0
41.2k
question
stringlengths
74
4.21k
target
stringlengths
5
888
15,200
public void setBookVersion ( final String bookVersion ) { if ( bookVersion == null && this . bookVersion == null ) { return ; } else if ( bookVersion == null ) { removeChild ( this . bookVersion ) ; this . bookVersion = null ; } else if ( this . bookVersion == null ) { this . bookVersion = new KeyValueNode < String > (...
Set the BookVersion of the Book the Content Specification represents .
15,201
public void setEdition ( final String edition ) { if ( edition == null && this . edition == null ) { return ; } else if ( edition == null ) { removeChild ( this . edition ) ; this . edition = null ; } else if ( this . edition == null ) { this . edition = new KeyValueNode < String > ( CommonConstants . CS_EDITION_TITLE ...
Set the Edition of the Book the Content Specification represents .
15,202
public void setPubsNumber ( final Integer pubsNumber ) { if ( pubsNumber == null && this . pubsNumber == null ) { return ; } else if ( pubsNumber == null ) { removeChild ( this . pubsNumber ) ; this . pubsNumber = null ; } else if ( this . pubsNumber == null ) { this . pubsNumber = new KeyValueNode < Integer > ( Common...
Set the publication number for the Content Specification .
15,203
public String getPublicanCfg ( ) { return ! publicanCfgs . containsKey ( DEFAULT_PUBLICAN_CFG_KEY ) ? null : publicanCfgs . get ( DEFAULT_PUBLICAN_CFG_KEY ) . getValueText ( ) ; }
Gets the data what will be appended to the publican . cfg file when built .
15,204
public String getAdditionalPublicanCfg ( final String name ) { return ! publicanCfgs . containsKey ( name ) ? null : publicanCfgs . get ( name ) . getValueText ( ) ; }
Gets the data what will be appended to the custom additional publican . cfg file when built .
15,205
public KeyValueNode < String > getAdditionalPublicanCfgNode ( final String name ) { return ! publicanCfgs . containsKey ( name ) ? null : publicanCfgs . get ( name ) ; }
Gets the custom additional publican . cfg node for the specified name .
15,206
public Map < String , String > getAllAdditionalPublicanCfgs ( ) { final Map < String , String > retValue = new HashMap < String , String > ( ) ; for ( final Map . Entry < String , KeyValueNode < String > > entry : publicanCfgs . entrySet ( ) ) { if ( ! DEFAULT_PUBLICAN_CFG_KEY . equals ( entry . getKey ( ) ) ) { retVal...
Gets all of the additional custom publican . cfg files in the
15,207
public void setDefaultPublicanCfg ( final String defaultPublicanCfg ) { if ( defaultPublicanCfg == null && this . defaultPublicanCfg == null ) { return ; } else if ( defaultPublicanCfg == null ) { removeChild ( this . defaultPublicanCfg ) ; this . defaultPublicanCfg = null ; } else if ( this . defaultPublicanCfg == nul...
Set the default publican . cfg configuration that should be used when building .
15,208
public void setFormat ( final String format ) { if ( format == null && this . format == null ) { return ; } else if ( format == null ) { removeChild ( this . format ) ; this . format = null ; } else if ( this . format == null ) { this . format = new KeyValueNode < String > ( CommonConstants . CS_FORMAT_TITLE , format )...
Sets the DTD for a Content Specification .
15,209
public void setCopyrightHolder ( final String copyrightHolder ) { if ( copyrightHolder == null && this . copyrightHolder == null ) { return ; } else if ( copyrightHolder == null ) { removeChild ( this . copyrightHolder ) ; this . copyrightHolder = null ; } else if ( this . copyrightHolder == null ) { this . copyrightHo...
Set the Copyright Holder of the Content Specification and the book it creates .
15,210
public void setBookType ( final BookType bookType ) { if ( bookType == null && this . bookType == null ) { return ; } else if ( bookType == null ) { removeChild ( this . bookType ) ; this . bookType = null ; } else if ( this . bookType == null ) { this . bookType = new KeyValueNode < BookType > ( CommonConstants . CS_B...
Set the Type of Book the Content Specification should be created for . The current values that are supported are Book and Article .
15,211
public void setBrandLogo ( final String brandLogo ) { if ( brandLogo == null && this . brandLogo == null ) { return ; } else if ( brandLogo == null ) { removeChild ( this . brandLogo ) ; this . brandLogo = null ; } else if ( this . brandLogo == null ) { this . brandLogo = new KeyValueNode < String > ( CommonConstants ....
Sets the path of the Brand Logo for the Content Specification .
15,212
public void setInjectionOptions ( final InjectionOptions injectionOptions ) { if ( injectionOptions == null && this . injectionOptions == null ) { return ; } else if ( injectionOptions == null ) { removeChild ( this . injectionOptions ) ; this . injectionOptions = null ; } else if ( this . injectionOptions == null ) { ...
Sets the InjectionOptions that will be used by the Builder when building a book .
15,213
public void setLocale ( final String locale ) { if ( locale == null && this . locale == null ) { return ; } else if ( locale == null ) { removeChild ( this . locale ) ; this . locale = null ; } else if ( this . locale == null ) { this . locale = new KeyValueNode < String > ( CommonConstants . CS_LOCALE_TITLE , locale )...
Sets the Content Specifications locale .
15,214
public void setUseDefaultPreface ( final Boolean useDefaultPreface ) { if ( useDefaultPreface == null && this . useDefaultPreface == null ) { return ; } else if ( useDefaultPreface == null ) { removeChild ( this . useDefaultPreface ) ; this . useDefaultPreface = null ; } else if ( this . useDefaultPreface == null ) { t...
Sets the Content Specifications Default Preface setting .
15,215
public void setOutputStyle ( final String outputStyle ) { if ( outputStyle == null && this . outputStyle == null ) { return ; } else if ( outputStyle == null ) { removeChild ( this . outputStyle ) ; this . outputStyle = null ; } else if ( this . outputStyle == null ) { this . outputStyle = new KeyValueNode < String > (...
Sets the Content Specifications output style .
15,216
public void setBugzillaVersion ( final String bugzillaVersion ) { if ( bugzillaVersion == null && this . bugzillaVersion == null ) { return ; } else if ( bugzillaVersion == null ) { removeChild ( this . bugzillaVersion ) ; this . bugzillaVersion = null ; } else if ( this . bugzillaVersion == null ) { this . bugzillaVer...
Set the Bugzilla Version to be applied during building .
15,217
public void setBugzillaKeywords ( final String bugzillaKeywords ) { if ( bugzillaKeywords == null && this . bugzillaKeywords == null ) { return ; } else if ( bugzillaKeywords == null ) { removeChild ( this . bugzillaKeywords ) ; this . bugzillaKeywords = null ; } else if ( this . bugzillaKeywords == null ) { this . bug...
Set the Bugzilla Keywords to be applied during building .
15,218
public void setBugzillaURL ( final String bugzillaURL ) { if ( bugzillaURL == null && this . bugzillaURL == null ) { return ; } else if ( bugzillaURL == null ) { removeChild ( this . bugzillaURL ) ; this . bugzillaURL = null ; } else if ( this . bugzillaURL == null ) { this . bugzillaURL = new KeyValueNode < String > (...
Set the URL component that is used in the . ent file when building the Docbook files .
15,219
public void setJIRAVersion ( final String jiraVersion ) { if ( jiraVersion == null && this . jiraVersion == null ) { return ; } else if ( jiraVersion == null ) { removeChild ( this . jiraVersion ) ; this . jiraVersion = null ; } else if ( this . jiraVersion == null ) { this . jiraVersion = new KeyValueNode < String > (...
Set the JIRA Version to be applied during building .
15,220
public void setJIRALabels ( final String jiraLabels ) { if ( jiraLabels == null && this . jiraLabels == null ) { return ; } else if ( jiraLabels == null ) { removeChild ( this . jiraLabels ) ; this . jiraLabels = null ; } else if ( this . jiraLabels == null ) { this . jiraLabels = new KeyValueNode < String > ( CommonCo...
Set the JIRA Labels to be applied during building .
15,221
public void setRevisionHistory ( final SpecTopic revisionHistory ) { if ( revisionHistory == null && this . revisionHistory == null ) { return ; } else if ( revisionHistory == null ) { removeChild ( this . revisionHistory ) ; this . revisionHistory = null ; } else if ( this . revisionHistory == null ) { revisionHistory...
Sets the SpecTopic of the Revision History for the Content Specification .
15,222
public void setFeedback ( final SpecTopic feedback ) { if ( feedback == null && this . feedback == null ) { return ; } else if ( feedback == null ) { removeChild ( this . feedback ) ; this . feedback = null ; } else if ( this . feedback == null ) { feedback . setTopicType ( TopicType . FEEDBACK ) ; this . feedback = ne...
Sets the SpecTopic of the Feedback for the Content Specification .
15,223
public void setLegalNotice ( final SpecTopic legalNotice ) { if ( legalNotice == null && this . legalNotice == null ) { return ; } else if ( legalNotice == null ) { removeChild ( this . legalNotice ) ; this . legalNotice = null ; } else if ( this . legalNotice == null ) { legalNotice . setTopicType ( TopicType . LEGAL_...
Sets the SpecTopic of the Legal Notice for the Content Specification .
15,224
public void setAuthorGroup ( final SpecTopic authorGroup ) { if ( authorGroup == null && this . authorGroup == null ) { return ; } else if ( authorGroup == null ) { removeChild ( this . authorGroup ) ; this . authorGroup = null ; } else if ( this . authorGroup == null ) { authorGroup . setTopicType ( TopicType . AUTHOR...
Sets the SpecTopic of the Author Group for the Content Specification .
15,225
public void setGroupId ( final String groupId ) { if ( groupId == null && this . groupId == null ) { return ; } else if ( groupId == null ) { removeChild ( this . groupId ) ; this . groupId = null ; } else if ( this . groupId == null ) { this . groupId = new KeyValueNode < String > ( CommonConstants . CS_MAVEN_GROUP_ID...
Set the Maven groupId that is used in the pom . xml file when building the jDocbook files .
15,226
public void setArtifactId ( final String artifactId ) { if ( artifactId == null && this . artifactId == null ) { return ; } else if ( artifactId == null ) { removeChild ( this . artifactId ) ; this . artifactId = null ; } else if ( this . artifactId == null ) { this . artifactId = new KeyValueNode < String > ( CommonCo...
Set the Maven artifactId that is used in the pom . xml file when building the jDocbook files .
15,227
public void setPOMVersion ( final String pomVersion ) { if ( pomVersion == null && this . pomVersion == null ) { return ; } else if ( pomVersion == null ) { removeChild ( this . pomVersion ) ; this . pomVersion = null ; } else if ( this . pomVersion == null ) { this . pomVersion = new KeyValueNode < String > ( CommonCo...
Set the Maven POM version that is used in the pom . xml file when building the jDocbook files .
15,228
public void setFiles ( final List < File > files ) { if ( files == null && this . files == null ) { return ; } else if ( files == null ) { removeChild ( this . files ) ; this . files = null ; } else if ( this . files == null ) { this . files = new FileList ( CommonConstants . CS_FILE_TITLE , files ) ; appendChild ( thi...
Sets the list of additional files needed by the book .
15,229
public void setEntities ( final String entities ) { if ( entities == null && this . entities == null ) { return ; } else if ( entities == null ) { removeChild ( this . entities ) ; this . entities = null ; } else if ( this . entities == null ) { this . entities = new KeyValueNode < String > ( CommonConstants . CS_ENTIT...
Set the data that will be appended to the &lt ; book&gt ; . ent file when built .
15,230
public void setIncludeIndex ( final Boolean includeIndex ) { if ( includeIndex == null && this . includeIndex == null ) { return ; } else if ( includeIndex == null ) { removeChild ( this . includeIndex ) ; this . includeIndex = null ; } else if ( this . includeIndex == null ) { this . includeIndex = new KeyValueNode < ...
Set whether an index should be included in the Content Specification output .
15,231
protected void appendChild ( final Node child , boolean checkForType ) { if ( checkForType && child instanceof KeyValueNode ) { appendKeyValueNode ( ( KeyValueNode < ? > ) child ) ; } else if ( checkForType && child instanceof Level ) { getBaseLevel ( ) . appendChild ( child ) ; } else if ( checkForType && child instan...
Adds a Child node to the Content Spec . If the Child node already has a parent then it is removed from that parent and added to this content spec .
15,232
public boolean processServletCommand ( ) throws DBException { String strCommand = this . getProperty ( DBParams . COMMAND ) ; if ( strCommand == null ) strCommand = Constants . BLANK ; boolean bSuccess = false ; if ( this . getScreenField ( ) instanceof BasePanel ) { if ( strCommand . equalsIgnoreCase ( ThinMenuConstan...
Move the HTML input format to the fields and do the action requested .
15,233
public String getZmlImagePath ( ) { String strImage = null ; if ( this . getScreenField ( ) . getConverter ( ) != null ) if ( this . getScreenField ( ) . getConverter ( ) . getField ( ) != null ) if ( ! this . getScreenField ( ) . getConverter ( ) . getField ( ) . isNull ( ) ) { BaseField field = ( BaseField ) this . g...
Get the path to the image in this control .
15,234
public String getDefaultFormsParam ( ) { if ( this . getScreenField ( ) . getParentScreen ( ) != null ) return ( ( ZScreenField ) this . getScreenField ( ) . getParentScreen ( ) . getScreenFieldView ( ) ) . getDefaultFormsParam ( ) ; else return null ; }
Get the Forms param to be passed on submit .
15,235
public String getJnlpURL ( String strJnlpURL , Map < String , Object > propApplet , Map < String , Object > properties ) { String strBaseURL = ( String ) properties . get ( DBParams . BASE_URL ) ; if ( strBaseURL == null ) strBaseURL = DBConstants . BLANK ; else if ( ( ! strBaseURL . startsWith ( "/" ) ) && ( ! strBase...
Create a URL to retrieve the JNLP file .
15,236
public static < T > T getValue ( Class < T > type , Selector selector ) throws ExecutionException { return convert ( getValue ( selector ) , type ) ; }
Return the selector value represents in the type class .
15,237
public static Object getRestrictedValue ( Selector selector , SelectorType type ) throws ExecutionException { Object field = null ; if ( type != null && selector . getType ( ) != type ) { throw new ExecutionException ( "The selector type expected is: " + type + " but received: " + selector . getType ( ) ) ; } switch ( ...
Return the selector value only if the type matches with the specified value .
15,238
public static Class getClass ( Selector selector ) throws ExecutionException { Class returnClass = null ; switch ( selector . getType ( ) ) { case STRING : case COLUMN : returnClass = String . class ; break ; case BOOLEAN : returnClass = Boolean . class ; break ; case INTEGER : returnClass = Long . class ; break ; case...
Return the selector value class .
15,239
public void setProperty ( String strProperty , String strValue ) { if ( strValue == null ) strValue = NULL ; if ( strValue != null ) m_properties . setProperty ( strProperty , strValue ) ; else m_properties . remove ( strProperty ) ; }
Set this comand property .
15,240
@ SuppressWarnings ( "unchecked" ) public static List < TopLevelGdl > parse ( Reader input ) throws Exception { try { Scanner lexer = new GdlScanner ( input ) ; SymbolFactory symbolFactory = new ComplexSymbolFactory ( ) ; Symbol result = new GdlParser ( lexer , symbolFactory ) . parse ( ) ; return ( List < TopLevelGdl ...
This consumes and closes the input .
15,241
private Request getRequest ( Action action , BrokerSession session ) { switch ( action ) { case QUERY : if ( query == null ) { query = new Request ( action ) ; query . addParameter ( "UID" , session . getId ( ) ) ; } return query ; case PING : if ( ping == null ) { ping = new Request ( action ) ; } return ping ; defaul...
Creates a request packet for the specified action .
15,242
private void pollHost ( BrokerSession session ) { Request request = ! enabled ? null : getRequest ( session . pollingAction ( ) , session ) ; if ( request == null ) { return ; } try { Response response = session . netCall ( request , 1000 ) ; String results [ ] = response . getData ( ) . split ( Constants . LINE_SEPARA...
Polls the host at the specified interval for asynchronous activity .
15,243
public void run ( ) { synchronized ( monitor ) { while ( ! terminated ) { try { BrokerSession session = this . sessionRef . get ( ) ; if ( session == null ) { break ; } else { pollHost ( session ) ; } session = null ; monitor . wait ( pollingInterval ) ; } catch ( InterruptedException e ) { } } } log . debug ( getName ...
Main polling loop .
15,244
public static MutableTimecodeDuration valueOf ( String timecode ) throws IllegalArgumentException { MutableTimecodeDuration td = new MutableTimecodeDuration ( ) ; return ( MutableTimecodeDuration ) td . parse ( timecode ) ; }
Returns a UnmodifiableTimecodeDuration instance for given TimecodeDuration storage string . Will return null in case the storage string represents a null TimecodeDuration
15,245
public RemoteTable getRemoteTable ( String strRecordName ) throws RemoteException { if ( ( strRecordName == null ) || ( strRecordName . length ( ) == 0 ) ) strRecordName = this . getMainRecord ( ) . getTableNames ( false ) ; if ( strRecordName . lastIndexOf ( '.' ) != - 1 ) strRecordName = strRecordName . substring ( s...
Get the remote table for this session .
15,246
public BaseMessageFilter setupRemoteFilter ( BaseMessageFilter messageFilter ) { Map < String , Object > propertiesForFilter = messageFilter . getProperties ( ) ; if ( propertiesForFilter != null ) { String strClassName = ( String ) propertiesForFilter . get ( MessageConstants . CLASS_NAME ) ; if ( strClassName != null...
Give a copy of the message filter set up a remote filter .
15,247
public void addMessageFilter ( BaseMessageFilter messageFilter ) { if ( messageFilter == null ) return ; m_mapFilters . put ( m_intNext , messageFilter ) ; messageFilter . setMessageReceiver ( this . getMessageReceiver ( ) , m_intNext ) ; int i = m_intNext . intValue ( ) ; if ( i == Integer . MAX_VALUE ) i = 0 ; m_intN...
Add this message filter to this receive queue .
15,248
public BaseMessageFilter findMessageFilter ( JMessageListener listener ) { Iterator < BaseMessageFilter > iterator = m_mapFilters . values ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { BaseMessageFilter filter = iterator . next ( ) ; for ( int i = 0 ; ( filter . getMessageListener ( i ) != null ) ; i ++ ) { i...
Lookup this message listener . This message looks through my list to see if the listener s filter is there .
15,249
public void start ( BundleContext context ) throws Exception { Util . getLogger ( ) . info ( "Starting Jdbc bundle" ) ; this . setProperty ( BundleConstants . TYPE , DBParams . JDBC ) ; super . start ( context ) ; }
Bundle starting up .
15,250
private Map < String , List < String > > createUsernameRolesMap ( final Iterable < String > roleList ) { final Map < String , List < String > > usersRolesMap = new HashMap < > ( ) ; for ( final String role : roleList ) { for ( final String user : getUsersWithRole ( role ) ) { if ( usersRolesMap . containsKey ( user ) )...
and only the roles contained in the roleList are included in the role lists .
15,251
private Iterable < String > retainExistingRoles ( final Collection < String > roles ) { final List < String > existingRoles = getRoles ( ) ; existingRoles . retainAll ( roles ) ; return existingRoles ; }
Returns a list of roles present in both the roles parameter and in community
15,252
public ZipFileBuilder addClasspathResource ( final String zipEntryPath , final String pathToResource ) { final Class < ? > callerClass = getCallerClass ( ) ; final URL resource = resolver . resolve ( pathToResource , callerClass ) ; addResource ( zipEntryPath , resource ) ; return this ; }
Adds an entry to the zip file from a classpath resource .
15,253
public ZipFileBuilder addResource ( String zipEntryPath , URL resource ) { this . entryMap . put ( zipEntryPath , resource ) ; return this ; }
Adds a resource to the Zip File under the path specified .
15,254
public int fieldChanged ( boolean bDisplayOption , int iMoveMode ) { if ( m_bWaiting ) { synchronized ( this ) { m_bWaiting = false ; this . notify ( ) ; } } return super . fieldChanged ( bDisplayOption , iMoveMode ) ; }
The Field has Changed . Don t need to call inherited .
15,255
public int waitForChange ( ) { if ( m_lTimeOut <= 0 ) return TIMEOUT_ERROR ; m_bWaiting = false ; synchronized ( this ) { long lStartTime = System . currentTimeMillis ( ) ; try { m_bWaiting = true ; this . wait ( m_lTimeOut ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } m_lTimeOut = m_lTimeOut - (...
Wait for this field to change .
15,256
public IntReference put ( K key , int value ) { IntReference w = map . get ( key ) ; if ( w == null ) { w = new IntReference ( value ) ; return map . put ( key , w ) ; } else { w . value = value ; return null ; } }
Associates value to key
15,257
public < T extends SebConfiguration > Seb withConfiguration ( Class < T > configCls ) { try { return withConfiguration ( configCls . getConstructor ( ) . newInstance ( ) ) ; } catch ( Exception e ) { throw new SebConfigurationConstructException ( "Unable to construct Seb configuration " + configCls . getName ( ) , e ) ...
Set configuration to configuration constructed from given class . Configuration class needs to have constructor with no parameters .
15,258
public Seb withLabel ( String ... labels ) { this . label = utils . join ( LABEL_DELIMITER , ( Object [ ] ) labels ) ; return this ; }
Set label joining given labels .
15,259
public void setLabel ( String ... labels ) { this . label = utils . join ( LABEL_DELIMITER , ( Object [ ] ) labels ) ; }
Modify Seb label joining given labels .
15,260
public Seb useEnclosingMethodLabel ( ) { final StackTraceElement e = Thread . currentThread ( ) . getStackTrace ( ) [ 2 ] ; final String s = e . getClassName ( ) ; setLabel ( s . substring ( s . lastIndexOf ( '.' ) + 1 , s . length ( ) ) , e . getMethodName ( ) ) ; return this ; }
Sets label using enclosing method class name and method name .
15,261
public void writeThisClass ( String strClassName , String strRecordType ) { Record recFileHdr = this . getRecord ( FileHdr . FILE_HDR_FILE ) ; try { recFileHdr . addNew ( ) ; recFileHdr . getField ( FileHdr . FILE_NAME ) . setString ( strClassName ) ; recFileHdr . setKeyArea ( FileHdr . FILE_NAME_KEY ) ; if ( recFileHd...
Write this class using the correct method for the type .
15,262
public int getRecordCount ( FieldTable table ) { int iKeyOrder = table . getRecord ( ) . getDefaultOrder ( ) ; if ( iKeyOrder == - 1 ) iKeyOrder = Constants . MAIN_KEY_AREA ; return this . getPKeyArea ( iKeyOrder ) . getRecordCount ( ) ; }
Get the record count . Just returns the count of the default key area .
15,263
public void open ( FieldTable table ) throws DBException { super . open ( table ) ; if ( ! m_bDataIn ) { m_bDataIn = true ; this . readData ( table ) ; } }
Init this object
15,264
public static NetworkPort remotePort ( String hostname , int port ) { return new RemoteNetworkPort ( hostname , port , NetworkPort . Type . TCP ) ; }
Creates a type - safe tcp port pointing ot a remote host and port .
15,265
public static NetworkPort remoteDatagramPort ( String hostname , int port ) { return new RemoteNetworkPort ( hostname , port , NetworkPort . Type . UDP ) ; }
Creates a type - safe udp port pointing ot a remote host and port .
15,266
public static URI buildUri ( String httpOrHttps , String host , String path , Map < String , String > paramMap ) { try { return new URIBuilder ( ) . setScheme ( httpOrHttps ) . setHost ( host ) . setPath ( path ) . setParameters ( buildNameValuePareList ( paramMap ) ) . build ( ) ; } catch ( URISyntaxException e ) { th...
Build uri uri .
15,267
public static List < NameValuePair > buildNameValuePareList ( Map < String , String > keyValueMap ) { return keyValueMap . entrySet ( ) . stream ( ) . map ( entry -> new BasicNameValuePair ( entry . getKey ( ) , entry . getValue ( ) ) ) . collect ( toList ( ) ) ; }
Build name value pare list list .
15,268
@ SuppressWarnings ( "unchecked" ) private Map < Long , DataPoint > _getRowWithCache ( long timestampMs ) { int [ ] yyyymm_dd = toYYYYMM_DD ( timestampMs ) ; int yyyymmdd = yyyymm_dd [ 0 ] * 100 + yyyymm_dd [ 1 ] ; ICache cache = getCache ( ) ; String cacheKey = String . valueOf ( yyyymmdd ) ; Object temp = cache != nu...
Gets all data points of a day specified by the timestamp cache supported .
15,269
private Map < Long , DataPoint > _getRow ( String counterName , int yyyymm , int dd ) { Map < Long , DataPoint > result = new HashMap < Long , DataPoint > ( ) ; ResultSet rs = CqlUtils . execute ( sessionHelper . getSession ( ) , cqlGetRow , getConsistencyLevelForRead ( ) , counterName , yyyymm , dd ) ; for ( Iterator ...
Gets all data points of a day .
15,270
public static final byte [ ] fromHex ( String hexDump ) { List < Integer > list = new ArrayList < > ( ) ; String [ ] lines = hexDump . split ( "\n" ) ; if ( lines . length < 2 ) { throw new IllegalArgumentException ( "not a hex dump" ) ; } if ( ! lines [ 0 ] . contains ( Title ) ) { throw new IllegalArgumentException (...
Recreates byte array from hex dump .
15,271
public static final String remainingToHex ( ByteBuffer bb ) { byte [ ] buf = new byte [ bb . remaining ( ) ] ; int safe = bb . position ( ) ; bb . get ( buf ) ; bb . position ( safe ) ; return toHex ( buf ) ; }
Creates readable view to byte buffer remaining . Doesn t change byte buffer .
15,272
public static final String startToHex ( ByteBuffer bb ) { byte [ ] buf = new byte [ bb . position ( ) ] ; int safePos = bb . position ( ) ; int safeLim = bb . limit ( ) ; bb . position ( 0 ) ; bb . get ( buf ) ; bb . position ( safePos ) ; bb . limit ( safeLim ) ; return toHex ( buf ) ; }
Creates readable view to byte buffer remaining . Mark will be discarded .
15,273
public BaseField getSyncedListenersField ( BaseField field , FieldListener listener ) { if ( field != null ) if ( field . getRecord ( ) == this . getOwner ( ) . getRecord ( ) ) field = listener . getOwner ( ) . getRecord ( ) . getField ( field . getFieldName ( ) ) ; return field ; }
When cloning a listener if the field is contained in the source record get the same field is the new record .
15,274
public boolean respondsToMode ( int iMoveMode ) { if ( iMoveMode == DBConstants . SCREEN_MOVE ) return m_bScreenMove ; if ( iMoveMode == DBConstants . INIT_MOVE ) return m_bInitMove ; if ( iMoveMode == DBConstants . READ_MOVE ) return m_bReadMove ; return false ; }
Does this listener respond to this mode?
15,275
private final String eval ( final String str ) throws InvalidExpression { if ( str == null ) return null ; return new MapExpression ( str , null , mapper , false ) . eval ( ) . get ( ) ; }
GET with MapExpression
15,276
protected void addToCache ( K canonicalKey , R row ) { assert ObjectUtils . equals ( canonicalize ( row . getKey ( ) ) , canonicalKey ) ; rowCache . get ( ) . put ( canonicalKey , row ) ; }
Adds a single object to the cache .
15,277
public BaseMessageHeader createMessageHeader ( ) { Map < String , Object > properties = ( ( PropertiesField ) this . getField ( MessageLog . MESSAGE_HEADER_PROPERTIES ) ) . getProperties ( ) ; BaseMessageHeader messageHeader = null ; String strMessageHeaderClassName = this . getField ( MessageLog . MESSAGE_HEADER_CLASS...
CreateMessageHeader Method .
15,278
public BaseMessageRecordDesc createMessageData ( ) { MessageRecordDesc messageData = null ; String strMessageDataClassName = this . getField ( MessageLog . MESSAGE_DATA_CLASS_NAME ) . toString ( ) ; return MessageRecordDesc . createMessageRecordDesc ( strMessageDataClassName , null , null ) ; }
CreateMessageData Method .
15,279
public String getProperty ( String strKey ) { String strProperty = this . getMessageProperty ( strKey ) ; if ( strProperty == null ) strProperty = ( ( PropertiesField ) this . getField ( MessageLog . MESSAGE_HEADER_PROPERTIES ) ) . getProperty ( strKey ) ; if ( strProperty == null ) strProperty = ( ( PropertiesField ) ...
Get this property from this record .
15,280
public static final IntStream toDigits ( long v , int length , int radix ) { Spliterator . OfInt spliterator = Spliterators . spliterator ( new PRimIt ( v , length , radix ) , Long . MAX_VALUE , 0 ) ; return StreamSupport . intStream ( spliterator , false ) ; }
Returns IntStream where each item is a digit . I . e zero leading digits .
15,281
public static final char parseChar ( CharSequence cs , int beginIndex , int endIndex ) { if ( endIndex - beginIndex != 1 ) { throw new IllegalArgumentException ( "input length must be 1" ) ; } return cs . charAt ( beginIndex ) ; }
Returns char from input .
15,282
public static final boolean parseBoolean ( CharSequence cs , int beginIndex , int endIndex ) { return endIndex - beginIndex == 4 && Character . codePointCount ( cs , beginIndex , endIndex ) == 4 && Character . toUpperCase ( Character . codePointAt ( cs , beginIndex ) ) == 'T' && Character . toUpperCase ( Character . co...
Parses the char sequence argument as a boolean . The boolean returned represents the value true if the char sequence argument is not null and is equal ignoring case to the string true .
15,283
public static final boolean parseBoolean ( CharSequence cs , int radix , int beginIndex , int endIndex ) { if ( radix != 2 ) { throw new IllegalArgumentException ( "radix must be 2" ) ; } if ( Character . codePointCount ( cs , beginIndex , endIndex ) != 1 ) { throw new IllegalArgumentException ( "input length must be 1...
Parses the char sequence argument as a boolean . The boolean returned represents the value true if the char sequence argument is not null and it s digit value is 1 .
15,284
public static final float parseFloat ( CharSequence cs , int beginIndex , int endIndex ) { FloatState fs = FloatState . Significand ; int end = endIndex ; int significand = 0 ; int sign = 1 ; int index = beginIndex ; int decimal = 0 ; int exponent = 0 ; int exponentSign = 1 ; boolean overFlow = false ; int cp = Charact...
Parses float from decimal floating point representation .
15,285
public static final int findInt ( CharSequence cs , int radix , int beginIndex , int endIndex ) { IntPredicate predicate = null ; switch ( radix ) { case 8 : predicate = Primitives :: isOctalDigit ; break ; case 10 : predicate = Primitives :: isDecimalDigit ; break ; case 16 : predicate = Primitives :: isHexDigit ; bre...
Parses next int
15,286
public static final float findFloat ( CharSequence cs , int beginIndex , int endIndex ) { int begin = CharSequences . indexOf ( cs , Primitives :: isFloatDigit , beginIndex ) ; int end = CharSequences . indexOf ( cs , ( c ) -> ! Primitives . isFloatDigit ( c ) , begin ) ; return parseFloat ( cs , begin , endIndex ( end...
Parses next float
15,287
public static final double findDouble ( CharSequence cs , int beginIndex , int endIndex ) { int begin = CharSequences . indexOf ( cs , Primitives :: isFloatDigit , beginIndex ) ; int end = CharSequences . indexOf ( cs , ( c ) -> ! Primitives . isFloatDigit ( c ) , begin ) ; return parseDouble ( cs , begin , endIndex ( ...
Parses next double in decimal form
15,288
public static final double findScientific ( CharSequence cs , int beginIndex , int endIndex ) { int begin = CharSequences . indexOf ( cs , Primitives :: isScientificDigit , beginIndex ) ; int end = CharSequences . indexOf ( cs , ( c ) -> ! Primitives . isScientificDigit ( c ) , begin ) ; return parseDouble ( cs , begin...
Parses next double in scientific form
15,289
public static DoubleUnaryOperator b ( int n , int m ) { return ( t ) -> c ( n , m ) * Math . pow ( t , m ) * Math . pow ( 1 - t , n - m ) ; }
Returns Bernstein polynomial
15,290
public static String toFirstLower ( String name ) { if ( isEmpty ( name ) ) { return name ; } return "" + name . toLowerCase ( Locale . ROOT ) . charAt ( 0 ) + name . substring ( 1 ) ; }
Make the first character lower case
15,291
public static String toFirstUpper ( String name ) { if ( isEmpty ( name ) ) { return name ; } return "" + name . toUpperCase ( Locale . ROOT ) . charAt ( 0 ) + name . substring ( 1 ) ; }
Make the first character upper case
15,292
public String getInputType ( String strViewType ) { if ( ScreenModel . HTML_TYPE . equalsIgnoreCase ( strViewType ) ) return "date" ; else return super . getInputType ( strViewType ) ; }
Get the HTML Input Type .
15,293
public void getSQLFromField ( PreparedStatement statement , int iType , int iParamColumn ) throws SQLException { if ( this . isNull ( ) ) { if ( ( ! this . isNullable ( ) ) || ( iType == DBConstants . SQL_SELECT_TYPE ) || ( DBConstants . FALSE . equals ( this . getRecord ( ) . getTable ( ) . getDatabase ( ) . getProper...
Move the physical binary data to this SQL parameter row . This method used the setTimestamp statement method .
15,294
public int setValue ( double value , boolean bDisplayOption , int iMoveMode ) { java . util . Date dateTemp = new java . util . Date ( ( long ) value ) ; int iErrorCode = this . setData ( dateTemp , bDisplayOption , iMoveMode ) ; return iErrorCode ; }
Set the Value of this field as a double .
15,295
public Calendar getCalendar ( ) { java . util . Date dateValue = ( java . util . Date ) this . getData ( ) ; if ( dateValue == null ) return null ; Calendar calendar = Calendar . getInstance ( ) ; calendar . setTime ( dateValue ) ; return calendar ; }
Get this field as a java calendar value .
15,296
public int setTime ( java . util . Date time , boolean bDisplayOption , int iMoveMode ) { java . util . Date m_DateTime = ( java . util . Date ) m_data ; int iYear = DBConstants . FIRST_YEAR ; int iMonth = DBConstants . FIRST_DAY ; int iDate = DBConstants . FIRST_MONTH ; if ( m_DateTime != null ) { m_calendar . setTime...
Change the time without changing the date .
15,297
public void setToLimit ( int iAreaDesc ) { m_calendar . set ( DBConstants . FIRST_YEAR , Calendar . JANUARY , 1 , 0 , 0 , 0 ) ; if ( iAreaDesc == DBConstants . END_SELECT_KEY ) m_calendar . set ( DBConstants . LAST_YEAR , Calendar . DECEMBER , 31 , 23 , 59 , 59 ) ; java . util . Date time = m_calendar . getTime ( ) ; t...
Set to the min or max value .
15,298
public static double todaysDate ( ) { java . util . Date date = new java . util . Date ( ) ; m_calendar . setTime ( date ) ; m_calendar . set ( Calendar . HOUR_OF_DAY , 0 ) ; m_calendar . set ( Calendar . MINUTE , 0 ) ; m_calendar . set ( Calendar . SECOND , 0 ) ; m_calendar . set ( Calendar . MILLISECOND , 0 ) ; date ...
Return the current date with a 0 time .
15,299
public static double currentTime ( ) { java . util . Date time = new java . util . Date ( ) ; m_calendar . setTime ( time ) ; m_calendar . set ( Calendar . MILLISECOND , 0 ) ; time = m_calendar . getTime ( ) ; return time . getTime ( ) ; }
Return the current date and time as a double .