signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class TransactionRepository { /** * Find transactions by transaction id ( not the auto - increment transaction . id ) */ public Transaction findByTransactionId ( String transactionId ) { } }
EntityManager entityManager = getEntityManager ( ) ; try { return entityManager . createQuery ( "SELECT t FROM io.motown.operatorapi.viewmodel.persistence.entities.Transaction AS t WHERE t.transactionId = :transactionId" , Transaction . class ) . setParameter ( "transactionId" , transactionId ) . getSingleResult ( ) ; ...
public class GrammarFactory { /** * Schema information is generated for processing the EXI body . * @ param xsdLocation * file location * @ param entityResolver * application can register XSD resolver * @ return schema - informed EXI grammars * @ throws EXIException * EXI exception */ public Grammars crea...
if ( xsdLocation == null || xsdLocation . equals ( "" ) ) { throw new EXIException ( "SchemaLocation not specified correctly!" ) ; } else { // System . out . println ( " Grammar for : " + xsdLocation ) ; grammarBuilder . loadGrammars ( xsdLocation , entityResolver ) ; SchemaInformedGrammars g = grammarBuilder . toGramm...
public class LittleEndianDataOutputStream { /** * / * ( non - Javadoc ) * @ see java . io . DataOutput # writeLong ( long ) */ @ Override public void writeLong ( long v ) throws IOException { } }
work [ 0 ] = ( byte ) ( 0xffL & v ) ; work [ 1 ] = ( byte ) ( 0xffL & ( v >> 8 ) ) ; work [ 2 ] = ( byte ) ( 0xffL & ( v >> 16 ) ) ; work [ 3 ] = ( byte ) ( 0xffL & ( v >> 24 ) ) ; work [ 4 ] = ( byte ) ( 0xffL & ( v >> 32 ) ) ; work [ 5 ] = ( byte ) ( 0xffL & ( v >> 40 ) ) ; work [ 6 ] = ( byte ) ( 0xffL & ( v >> 48 )...
public class HandlerEntityRequest { /** * < p > Handle request without changing transaction isolation . < / p > * @ param pRqVs Request scoped variables * @ param pRqDt Request Data * @ param pEntityClass Entity Class * @ param pActionsArr Actions Array * @ param pIsShowDebMsg Is Show Debug Messages * @ par...
Class < ? > entityClass = pEntityClass ; try { this . srvDatabase . setIsAutocommit ( false ) ; this . srvDatabase . setTransactionIsolation ( this . writeReTi ) ; this . srvDatabase . beginTransaction ( ) ; IHasId < ? > entity = null ; if ( pActionsArr [ 0 ] . startsWith ( "entity" ) ) { // actions like " save " , " d...
public class LoadBalancerFilter { /** * Method allow to find load balancers that contains { @ code substring } in description * Filtering is case insensitive . * @ param subStrings is a set of descriptions * @ return { @ link LoadBalancerFilter } */ public LoadBalancerFilter descriptionContains ( String ... subSt...
allItemsNotNull ( subStrings , "Load balancer description subStrings" ) ; predicate = predicate . and ( combine ( LoadBalancerMetadata :: getDescription , in ( asList ( subStrings ) , Predicates :: containsIgnoreCase ) ) ) ; return this ;
public class BoxApiBookmark { /** * Gets a request that deletes a bookmark * @ param id id of bookmark to delete * @ return request to delete a bookmark */ public BoxRequestsBookmark . DeleteBookmark getDeleteRequest ( String id ) { } }
BoxRequestsBookmark . DeleteBookmark request = new BoxRequestsBookmark . DeleteBookmark ( id , getBookmarkInfoUrl ( id ) , mSession ) ; return request ;
public class EventFilterLexer { /** * $ ANTLR start " TIME _ MILLIS _ FUN _ NAME " */ public final void mTIME_MILLIS_FUN_NAME ( ) throws RecognitionException { } }
try { int _type = TIME_MILLIS_FUN_NAME ; int _channel = DEFAULT_TOKEN_CHANNEL ; // EventFilter . g : 49:22 : ( ' time - millis ' ) // EventFilter . g : 49:24 : ' time - millis ' { match ( "time-millis" ) ; } state . type = _type ; state . channel = _channel ; } finally { // do for sure before leaving }
public class KamImpl { /** * { @ inheritDoc } */ @ Override public KamNode createNode ( Integer id , FunctionEnum functionType , String label ) throws InvalidArgument { } }
// See if the node already exists KamNode kamNode = findNode ( id ) ; if ( null == kamNode ) { kamNode = new KamNodeImpl ( this , id , functionType , label ) ; // add this node into the graph addNode ( kamNode ) ; } else { throw new InvalidArgument ( "node with id " + id + " already exists in the graph." ) ; } return k...
public class LinkedList { /** * Returns the last element in this list . * @ return the last element in this list * @ throws NoSuchElementException if this list is empty */ public E getLast ( ) { } }
final Node < E > l = last ; if ( l == null ) throw new NoSuchElementException ( ) ; return l . item ;
public class AbstractSamlProfileHandlerController { /** * Construct service url string . * @ param request the request * @ param response the response * @ param pair the pair * @ return the string * @ throws SamlException the saml exception */ @ SneakyThrows protected String constructServiceUrl ( final HttpSe...
val authnRequest = ( AuthnRequest ) pair . getLeft ( ) ; val messageContext = pair . getRight ( ) ; try ( val writer = SamlUtils . transformSamlObject ( samlProfileHandlerConfigurationContext . getOpenSamlConfigBean ( ) , authnRequest ) ) { val builder = new URLBuilder ( samlProfileHandlerConfigurationContext . getCall...
public class InternalXbaseParser { /** * $ ANTLR start synpred25 _ InternalXbase */ public final void synpred25_InternalXbase_fragment ( ) throws RecognitionException { } }
// InternalXbase . g : 2195:2 : ( ( ( rule _ _ OpOther _ _ Group _ 6_1_0 _ _ 0 ) ) ) // InternalXbase . g : 2195:2 : ( ( rule _ _ OpOther _ _ Group _ 6_1_0 _ _ 0 ) ) { // InternalXbase . g : 2195:2 : ( ( rule _ _ OpOther _ _ Group _ 6_1_0 _ _ 0 ) ) // InternalXbase . g : 2196:3 : ( rule _ _ OpOther _ _ Group _ 6_1_0 _ ...
import java . io . * ; import java . lang . * ; import java . util . * ; import java . math . * ; class FindLastCharacterInstance { /** * Function to locate the last instance of a character in a string . * Example : * findLastCharacterInstance ( ' hello world ' , ' l ' ) - > 10 * findLastCharacterInstance ( ' lan...
int lastSeen = - 1 ; for ( int idx = 0 ; idx < sentence . length ( ) ; idx ++ ) { if ( sentence . charAt ( idx ) == character ) { lastSeen = idx ; } } return lastSeen == - 1 ? null : ( lastSeen + 1 ) ;
public class ClassDefiner { /** * Return { @ link ClassLoader # defineClass } with a PermissionCollection containing AllPermission . * This method searches for a class and returns it . If it ' s not found , it ' s defined . * @ param classLoader the class loader * @ param className the class name * @ param clas...
Class < ? > klass = findLoadedClass ( classLoader , className ) ; if ( klass == null ) { try { klass = defineClass ( classLoader , className , classbytes ) ; } catch ( LinkageError ex ) { klass = findLoadedClass ( classLoader , className ) ; if ( klass == null ) { throw ex ; } } } return klass ;
public class Workgroup { /** * Asks the workgroup for it ' s Properties . * @ return the WorkgroupProperties for the specified workgroup . * @ throws XMPPErrorException * @ throws NoResponseException * @ throws NotConnectedException * @ throws InterruptedException */ public WorkgroupProperties getWorkgroupPro...
WorkgroupProperties request = new WorkgroupProperties ( ) ; request . setType ( IQ . Type . get ) ; request . setTo ( workgroupJID ) ; return connection . createStanzaCollectorAndSend ( request ) . nextResultOrThrow ( ) ;
public class Date { /** * getter for year - gets full year ( e . g . 2006 and NOT 06 ) , C * @ generated * @ return value of the feature */ public int getYear ( ) { } }
if ( Date_Type . featOkTst && ( ( Date_Type ) jcasType ) . casFeat_year == null ) jcasType . jcas . throwFeatMissing ( "year" , "de.julielab.jules.types.Date" ) ; return jcasType . ll_cas . ll_getIntValue ( addr , ( ( Date_Type ) jcasType ) . casFeatCode_year ) ;
public class MgcpCall { /** * Registers a connection in the call . * @ param endpointId The identifier of the endpoint that owns the connection . * @ param connectionId The connection identifier . * @ return Returns < code > true < / code > if connection was successfully registered . Returns < code > false < / co...
boolean added = this . entries . put ( endpointId , connectionId ) ; if ( added && log . isDebugEnabled ( ) ) { int left = this . entries . get ( endpointId ) . size ( ) ; log . debug ( "Call " + getCallIdHex ( ) + " registered connection " + Integer . toHexString ( connectionId ) + " at endpoint " + endpointId + ". Co...
public class MapOutputFile { /** * Return the path to local map output file created earlier * @ param mapTaskId a map task id */ public Path getOutputFile ( TaskAttemptID mapTaskId ) throws IOException { } }
return lDirAlloc . getLocalPathToRead ( TaskTracker . getIntermediateOutputDir ( jobId . toString ( ) , mapTaskId . toString ( ) ) + "/file.out" , conf ) ;
public class LoggingEventFieldResolver { /** * Apply fields . * @ param replaceText replacement text . * @ param event logging event . * @ return evaluted expression */ public String applyFields ( final String replaceText , final LoggingEvent event ) { } }
if ( replaceText == null ) { return null ; } InFixToPostFix . CustomTokenizer tokenizer = new InFixToPostFix . CustomTokenizer ( replaceText ) ; StringBuffer result = new StringBuffer ( ) ; boolean found = false ; while ( tokenizer . hasMoreTokens ( ) ) { String token = tokenizer . nextToken ( ) ; if ( isField ( token ...
public class Image { /** * Returns a future which will deliver the default texture for this image once its loading has * completed . Uses { @ link # texture } to create the texture . */ public RFuture < Texture > textureAsync ( ) { } }
return state . map ( new Function < Image , Texture > ( ) { public Texture apply ( Image image ) { return texture ( ) ; } } ) ;
public class UpdateMaintenanceWindowRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateMaintenanceWindowRequest updateMaintenanceWindowRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateMaintenanceWindowRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateMaintenanceWindowRequest . getWindowId ( ) , WINDOWID_BINDING ) ; protocolMarshaller . marshall ( updateMaintenanceWindowRequest . getName ( ) , NAM...
public class ResultPartition { /** * Pins the result partition . * < p > The partition can only be released after each subpartition has been consumed once per pin * operation . */ void pin ( ) { } }
while ( true ) { int refCnt = pendingReferences . get ( ) ; if ( refCnt >= 0 ) { if ( pendingReferences . compareAndSet ( refCnt , refCnt + subpartitions . length ) ) { break ; } } else { throw new IllegalStateException ( "Released." ) ; } }
public class JvmUnknownTypeReferenceImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case TypesPackage . JVM_UNKNOWN_TYPE_REFERENCE__QUALIFIED_NAME : setQualifiedName ( QUALIFIED_NAME_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ;
public class ValueUtils { /** * Convert a { @ link JsonNode } to { @ link List & lt ; JsonNode & gt ; } . * @ param node * @ return */ public static List < ? > convertArrayOrList ( JsonNode node ) { } }
if ( node instanceof POJONode ) { return convertArrayOrList ( DPathUtils . extractValue ( ( POJONode ) node ) ) ; } if ( node instanceof ArrayNode ) { List < JsonNode > result = new ArrayList < > ( ) ; ArrayNode arrNode = ( ArrayNode ) node ; for ( JsonNode jNode : arrNode ) { result . add ( jNode ) ; } return result ;...
public class DefaultMaven2OsgiConverter { /** * Computes the file name of the bundle used in Wisdom distribution for the given Maven artifact . * This convention is based on the uniqueness at runtime of ' bsn - version ' ( bsn is the bundle symbolic name ) . * @ param artifact the Maven artifact * @ return the co...
return getBundleFileName ( artifact . getGroupId ( ) , artifact . getArtifactId ( ) , artifact . getVersion ( ) ) ;
public class OggStreamDecoder { /** * Reads in a chunk of data from the underlying input stream . * @ return true if a chunk was read , false if we ' ve reached the end of the stream . */ protected boolean readChunk ( ) throws IOException { } }
int offset = _sync . buffer ( BUFFER_SIZE ) ; int bytes = _in . read ( _sync . data , offset , BUFFER_SIZE ) ; if ( bytes > 0 ) { _sync . wrote ( bytes ) ; return true ; } return false ;
public class Slf4jLoggerFactory { /** * Wraps the specified { @ linkplain # getImplementation implementation } in a Java logger . */ protected Logger wrap ( String name , org . slf4j . Logger implementation ) { } }
return new Slf4jLogger ( name , implementation ) ;
public class SpatialAnchorsAccountsInner { /** * Creating or Updating a Spatial Anchors Account . * @ param resourceGroupName Name of an Azure resource group . * @ param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account . * @ param spatialAnchorsAccount Spatial Anchors Account parameter ....
return createWithServiceResponseAsync ( resourceGroupName , spatialAnchorsAccountName , spatialAnchorsAccount ) . map ( new Func1 < ServiceResponse < SpatialAnchorsAccountInner > , SpatialAnchorsAccountInner > ( ) { @ Override public SpatialAnchorsAccountInner call ( ServiceResponse < SpatialAnchorsAccountInner > respo...
public class BsfUtils { /** * Pass facesContext . getViewRoot ( ) . getLocale ( ) and attrs locale value */ public static Locale selectLocale ( Locale vrloc , Object loc , UIComponent comp ) { } }
java . util . Locale selLocale = vrloc ; if ( loc != null ) { if ( loc instanceof String ) { selLocale = BsfUtils . toLocale ( ( String ) loc ) ; } else if ( loc instanceof java . util . Locale ) { selLocale = ( java . util . Locale ) loc ; } else { throw new IllegalArgumentException ( "Type:" + loc . getClass ( ) + " ...
public class ConfluenceGreenPepper { /** * < p > Getter for the field < code > userAccessor < / code > . < / p > * @ return a { @ link com . atlassian . confluence . user . UserAccessor } object . */ public UserAccessor getUserAccessor ( ) { } }
if ( userAccessor != null ) { return userAccessor ; } userAccessor = ( UserAccessor ) ContainerManager . getComponent ( "userAccessor" ) ; return userAccessor ;
public class ExecutionEntityManagerImpl { /** * Processes a collection of { @ link ExecutionEntity } instances , which form on execution tree . * All the executions share the same rootProcessInstanceId ( which is provided ) . * The return value will be the root { @ link ExecutionEntity } instance , with all child {...
ExecutionEntity rootExecution = null ; // Collect executions Map < String , ExecutionEntity > executionMap = new HashMap < String , ExecutionEntity > ( executions . size ( ) ) ; for ( ExecutionEntity executionEntity : executions ) { if ( executionEntity . getId ( ) . equals ( rootProcessInstanceId ) ) { rootExecution =...
public class Sketch { /** * Gets the approximate lower error bound given the specified number of Standard Deviations . * This will return getEstimate ( ) if isEmpty ( ) is true . * @ param numStdDev * < a href = " { @ docRoot } / resources / dictionary . html # numStdDev " > See Number of Standard Deviations < / ...
return ( isEstimationMode ( ) ) ? lowerBound ( getRetainedEntries ( true ) , getThetaLong ( ) , numStdDev , isEmpty ( ) ) : getRetainedEntries ( true ) ;
public class RestUriVariablesFactory { /** * Returns the uri variables needed for a meta call . * @ param entityInfo * @ param metaParameter * @ param fieldSet * @ return */ public Map < String , String > getUriVariablesForMeta ( BullhornEntityInfo entityInfo , MetaParameter metaParameter , Set < String > field...
return getUriVariablesForMeta ( entityInfo . getName ( ) , metaParameter , fieldSet , privateLabelId ) ;
public class InheritedChannel { /** * Returns a Channel representing the inherited channel if the * inherited channel is a stream connected to a network socket . */ public static synchronized Channel getChannel ( ) throws IOException { } }
if ( devnull < 0 ) { devnull = open0 ( "/dev/null" , O_RDWR ) ; } // If we don ' t have the channel try to create it if ( ! haveChannel ) { channel = createChannel ( ) ; haveChannel = true ; } // if there is a channel then do the security check before // returning it . if ( channel != null ) { checkAccess ( channel ) ;...
public class DisableEnhancedMonitoringResult { /** * Represents the list of all the metrics that would be in the enhanced state after the operation . * @ param desiredShardLevelMetrics * Represents the list of all the metrics that would be in the enhanced state after the operation . * @ see MetricsName */ public ...
if ( desiredShardLevelMetrics == null ) { this . desiredShardLevelMetrics = null ; return ; } this . desiredShardLevelMetrics = new com . amazonaws . internal . SdkInternalList < String > ( desiredShardLevelMetrics ) ;
public class UTEHelperFactory { /** * This method is used to return an instance of the UTEHelper . * @ return UTEHelper * @ throws IllegalStateException if called when the JMS Test environment is not enabled . */ public static synchronized UTEHelper getHelperInstance ( ) throws java . lang . IllegalStateException {...
if ( tcInt . isEntryEnabled ( ) ) SibTr . entry ( tcInt , "getHelperInstance" ) ; // * * * * * CHECK TO SEE IF IT IS ENABLED * * * * * try { // Initialise the test env flag from a system property if it has been set . String prop = System . getProperty ( "com.ibm.ws.sib.api.testenv" ) ; // Check that the text reads " en...
public class QRExampleOperations { /** * Returns the Q matrix . */ public DMatrixRMaj getQ ( ) { } }
DMatrixRMaj Q = CommonOps_DDRM . identity ( QR . numRows ) ; DMatrixRMaj Q_k = new DMatrixRMaj ( QR . numRows , QR . numRows ) ; DMatrixRMaj u = new DMatrixRMaj ( QR . numRows , 1 ) ; DMatrixRMaj temp = new DMatrixRMaj ( 1 , 1 ) ; int N = Math . min ( QR . numCols , QR . numRows ) ; // compute Q by first extracting the...
public class BaseTemplateFactory { /** * Process template and data using provided { @ link TemplateLoader } and { @ link TemplateRenderer } to generate skill response output . * @ param responseTemplateName name of response template * @ param dataMap map contains injecting data * @ param input skill input * @ r...
if ( templateLoaders == null || templateLoaders . isEmpty ( ) || templateRenderer == null ) { String message = "Template Loader list is null or empty, or Template Renderer is null." ; LOGGER . error ( message ) ; throw new TemplateFactoryException ( message ) ; } TemplateContentData templateContentData = loadTemplate (...
public class TabbedPaneBottomTabState { /** * { @ inheritDoc } */ public boolean isInState ( JComponent c ) { } }
return ( c instanceof JTabbedPane && ( ( JTabbedPane ) c ) . getTabPlacement ( ) == JTabbedPane . BOTTOM ) ;
public class MolgenisDateFormat { /** * Tries to parse a value representing a LocalDate . Tries many formats , but does require that the * date month and year are provided in yyyy - mm - dd form . If too much information is provided , such * as time and / or time zone , will simply truncate those away . * @ param...
TemporalAccessor temporalAccessor = DateTimeFormatter . ofPattern ( LOOSE_PARSER_FORMAT ) . parseBest ( value , ZonedDateTime :: from , LocalDate :: from ) ; if ( temporalAccessor instanceof ZonedDateTime ) { return ( ( ZonedDateTime ) temporalAccessor ) . toLocalDate ( ) ; } return ( LocalDate ) temporalAccessor ;
public class Vector3d { /** * Reflect this vector about the given normal vector . * @ param x * the x component of the normal * @ param y * the y component of the normal * @ param z * the z component of the normal * @ return a vector holding the result */ public Vector3d reflect ( double x , double y , do...
return reflect ( x , y , z , thisOrNew ( ) ) ;
public class RowKey { /** * Check if a column is part of the row key columns . * @ param column the name of the column to check * @ return true if the column is one of the row key columns , false otherwise */ public boolean contains ( String column ) { } }
for ( String columnName : columnNames ) { if ( columnName . equals ( column ) ) { return true ; } } return false ;
public class PlatformDependent { /** * Determine if a subsection of an array is zero . * @ param bytes The byte array . * @ param startPos The starting index ( inclusive ) in { @ code bytes } . * @ param length The amount of bytes to check for zero . * @ return { @ code false } if { @ code bytes [ startPos : st...
return ! hasUnsafe ( ) || ! unalignedAccess ( ) ? isZeroSafe ( bytes , startPos , length ) : PlatformDependent0 . isZero ( bytes , startPos , length ) ;
public class Files { /** * Given a directory , removes all the content found in the directory . * @ param dir The directory to be emptied * @ throws Exception */ static public void emptyDirectory ( File dir ) throws Exception { } }
String [ ] fileNames = dir . list ( ) ; if ( null != fileNames ) { for ( String fileName : fileNames ) { File file = new File ( dir , fileName ) ; if ( file . isDirectory ( ) ) { emptyDirectory ( file ) ; } boolean deleted = false ; try { deleted = file . delete ( ) ; } catch ( Exception e ) { throw new Exception ( "Un...
public class AppIdentityService { /** * getAppIdentity * @ return The application identity */ public AppIdentity getAppIdentity ( ) { } }
if ( isCached ( defaultApiConfig . getApplication ( ) ) ) return applicationIdentityCache . get ( defaultApiConfig . getApplication ( ) ) . getAppIdentity ( ) ; else return getAppIdentity ( defaultApiConfig ) ;
public class OmemoStore { /** * Return the fingerprint of the identityKey belonging to contactsDevice . * @ param userDevice our OmemoDevice . * @ param contactsDevice OmemoDevice we want to have the fingerprint for . * @ return fingerprint of the userDevices IdentityKey . * @ throws CorruptedOmemoKeyException ...
T_IdKey identityKey = loadOmemoIdentityKey ( userDevice , contactsDevice ) ; if ( identityKey == null ) { throw new NoIdentityKeyException ( contactsDevice ) ; } return keyUtil ( ) . getFingerprintOfIdentityKey ( identityKey ) ;
public class SingleThreadedOperation { /** * Starts the one and only job instance in a separate Thread . Should be called exactly one time before * the operation is stopped . * @ param arguments { @ inheritDoc } */ @ Override public void start ( String [ ] arguments ) { } }
boolean notStarted = ! started . getAndSet ( true ) ; if ( notStarted ) { start ( new SingleInstanceWorkloadStrategy ( job , name , arguments , endpointRegistry , execService ) ) ; }
public class SqlgUtil { /** * Loads all labeled or emitted elements . * @ param sqlgGraph * @ param resultSet * @ param subQueryStack * @ param lastQueryStack * @ param idColumnCountMap * @ return * @ throws SQLException */ @ SuppressWarnings ( "unchecked" ) private static < E extends SqlgElement > List <...
List < Emit < E > > result = new ArrayList < > ( ) ; int count = 1 ; for ( SchemaTableTree schemaTableTree : subQueryStack ) { if ( ! schemaTableTree . getLabels ( ) . isEmpty ( ) ) { E sqlgElement = null ; boolean resultSetWasNull ; if ( schemaTableTree . isHasIDPrimaryKey ( ) ) { String idProperty = schemaTableTree ....
public class CSSCompiler { /** * { @ inheritDoc } */ @ Override public OneCSS getNewSource ( final String _name , final Instance _instance ) { } }
return new OneCSS ( _name , _instance ) ;
public class DbSessionImpl { /** * We only care about the the commit section . * The rest is simply passed to its parent . */ @ Override public < T > Cursor < T > selectCursor ( String statement ) { } }
return session . selectCursor ( statement ) ;
public class DeviceDataDAODefaultImpl { public void insert_ul ( final DeviceData deviceData , final long argin ) { } }
final int val = ( int ) ( argin & 0xFFFFFFFF ) ; DevULongHelper . insert ( deviceData . getAny ( ) , val ) ;
public class Gen { /** * Visitor method : generate code for a definition , catching and reporting * any completion failures . * @ param tree The definition to be visited . * @ param env The environment current at the definition . */ public void genDef ( JCTree tree , Env < GenContext > env ) { } }
Env < GenContext > prevEnv = this . env ; try { this . env = env ; tree . accept ( this ) ; } catch ( CompletionFailure ex ) { chk . completionError ( tree . pos ( ) , ex ) ; } finally { this . env = prevEnv ; }
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcStructuralLoadSingleDisplacement ( ) { } }
if ( ifcStructuralLoadSingleDisplacementEClass == null ) { ifcStructuralLoadSingleDisplacementEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 549 ) ; } return ifcStructuralLoadSingleDisplacementEClass ;
public class InternalJSONUtil { /** * 按照给定格式格式化日期 , 格式为空时返回时间戳字符串 * @ param dateObj Date或者Calendar对象 * @ param format 格式 * @ return 日期字符串 */ private static String formatDate ( Object dateObj , String format ) { } }
if ( StrUtil . isNotBlank ( format ) ) { final Date date = ( dateObj instanceof Date ) ? ( Date ) dateObj : ( ( Calendar ) dateObj ) . getTime ( ) ; // 用户定义了日期格式 return DateUtil . format ( date , format ) ; } // 默认使用时间戳 return String . valueOf ( ( dateObj instanceof Date ) ? ( ( Date ) dateObj ) . getTime ( ) : ( ( Cal...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcCooledBeamType ( ) { } }
if ( ifcCooledBeamTypeEClass == null ) { ifcCooledBeamTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 119 ) ; } return ifcCooledBeamTypeEClass ;
public class SleeSipProviderImpl { /** * Creates a new { @ link ClientTransactionWrapper } bound to a * { @ link DialogWrapper } , which is not an activity in SLEE . * @ param dialogWrapper * @ param request * @ return * @ throws TransactionUnavailableException */ public ClientTransactionWrapper getNewDialogA...
final SIPClientTransaction ct = ( SIPClientTransaction ) provider . getNewClientTransaction ( request ) ; final ClientTransactionWrapper ctw = new ClientTransactionWrapper ( ct , ra ) ; dialogWrapper . addOngoingTransaction ( ctw ) ; return ctw ;
public class Caster { /** * cast a Object to a byte value ( primitive value type ) * @ param o Object to cast * @ return casted byte value * @ throws PageException * @ throws CasterException */ public static byte toByteValue ( Object o ) throws PageException { } }
if ( o instanceof Byte ) return ( ( Byte ) o ) . byteValue ( ) ; if ( o instanceof Character ) return ( byte ) ( ( ( Character ) o ) . charValue ( ) ) ; else if ( o instanceof Boolean ) return ( byte ) ( ( ( ( Boolean ) o ) . booleanValue ( ) ) ? 1 : 0 ) ; else if ( o instanceof Number ) return ( ( ( Number ) o ) . byt...
public class CommerceRegionPersistenceImpl { /** * Returns the first commerce region in the ordered set where commerceCountryId = & # 63 ; . * @ param commerceCountryId the commerce country ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the fir...
CommerceRegion commerceRegion = fetchByCommerceCountryId_First ( commerceCountryId , orderByComparator ) ; if ( commerceRegion != null ) { return commerceRegion ; } StringBundler msg = new StringBundler ( 4 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "commerceCountryId=" ) ; msg . append ( commerceCo...
public class cachecontentgroup { /** * Use this API to add cachecontentgroup . */ public static base_response add ( nitro_service client , cachecontentgroup resource ) throws Exception { } }
cachecontentgroup addresource = new cachecontentgroup ( ) ; addresource . name = resource . name ; addresource . weakposrelexpiry = resource . weakposrelexpiry ; addresource . heurexpiryparam = resource . heurexpiryparam ; addresource . relexpiry = resource . relexpiry ; addresource . relexpirymillisec = resource . rel...
public class PrivateZonesInner { /** * Creates or updates a Private DNS zone . Does not modify Links to virtual networks or DNS records within the zone . * @ param resourceGroupName The name of the resource group . * @ param privateZoneName The name of the Private DNS zone ( without a terminating dot ) . * @ para...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , privateZoneName , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class CmsSystemConfiguration { /** * Sets the locale manager for multi language support . < p > * @ param localeManager the locale manager to set */ public void setLocaleManager ( CmsLocaleManager localeManager ) { } }
m_localeManager = localeManager ; if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_CONFIG_I18N_FINISHED_0 ) ) ; }
public class Duration { /** * / * [ deutsch ] * < p > Liefert eine Kopie dieser Instanz , in der der angegebene Betrag zum * mit der angegebenen Zeiteinheit assoziierten Feldwert addiert wird . < / p > * < p > Die Methode ber & uuml ; cksichtigt auch das Vorzeichen der Zeitspanne . * Beispiel : < / p > * < pr...
if ( unit == null ) { throw new NullPointerException ( "Missing chronological unit." ) ; } long originalAmount = amount ; U originalUnit = unit ; boolean negatedValue = false ; if ( amount == 0 ) { return this ; } else if ( amount < 0 ) { amount = MathUtils . safeNegate ( amount ) ; negatedValue = true ; } // Millis un...
public class AFactoryAppBeans { /** * < p > Get FctBnCnvBnFromRs in lazy mode . < / p > * @ return FctBnCnvBnFromRs - FctBnCnvBnFromRs * @ throws Exception - an exception */ public final FctBnCnvBnFromRs < RS > lazyGetFctBnCnvBnFromRs ( ) throws Exception { } }
String beanName = getFctBnCnvBnFromRsName ( ) ; @ SuppressWarnings ( "unchecked" ) FctBnCnvBnFromRs < RS > fctBnCnvBnFromRs = ( FctBnCnvBnFromRs < RS > ) this . beansMap . get ( beanName ) ; if ( fctBnCnvBnFromRs == null ) { fctBnCnvBnFromRs = new FctBnCnvBnFromRs < RS > ( ) ; fctBnCnvBnFromRs . setEntitiesFactoriesFat...
public class PDBFileParser { /** * Process the disulfide bond info provided by an SSBOND record * < pre > * COLUMNS DATA TYPE FIELD DEFINITION * 1 - 6 Record name " SSBOND " * 8 - 10 Integer serNum Serial number . * 12 - 14 LString ( 3 ) " CYS " Residue name . * 16 Character chainID1 Chain identifier . * ...
if ( params . isHeaderOnly ( ) ) return ; if ( line . length ( ) < 36 ) { logger . info ( "SSBOND line has length under 36. Ignoring it." ) ; return ; } String chain1 = line . substring ( 15 , 16 ) ; String seqNum1 = line . substring ( 17 , 21 ) . trim ( ) ; String icode1 = line . substring ( 21 , 22 ) ; String chain2 ...
public class WhileyFileParser { /** * Parse a < i > property declaration < / i > which has the form : * < pre > * ProeprtyDeclaration : : = " property " Parameters " - > " Parameters ( WhereClause ) * * PropertyClause : : = " where " Expr * < / pre > */ private Decl . Property parsePropertyDeclaration ( Tuple <...
EnclosingScope scope = new EnclosingScope ( ) ; int start = index ; match ( Property ) ; Identifier name = parseIdentifier ( ) ; Tuple < Template . Variable > template = parseOptionalTemplate ( scope ) ; Tuple < Decl . Variable > parameters = parseParameters ( scope , RightBrace ) ; Tuple < Expr > invariant = parseInva...
public class StorageUpdate21 { /** * Deserialize an object from a byte array . */ private Object deserialize ( InputStream byteStream ) throws IOException , ClassNotFoundException { } }
ObjectInputStream in = new ObjectInputStream ( byteStream ) ; try { return in . readObject ( ) ; } finally { in . close ( ) ; }
public class NetworkMonitor { /** * Reads all options in the specified array , and puts relevant options into the * supplied options map . * On options not relevant for doing network monitoring ( like < code > help < / code > ) , * this method will take appropriate action ( like showing usage information ) . On ...
if ( args . length == 0 ) { System . out . println ( "A tool for monitoring a KNX network" ) ; showVersion ( ) ; System . out . println ( "type -help for help message" ) ; return false ; } // add defaults options . put ( "port" , new Integer ( KNXnetIPConnection . IP_PORT ) ) ; options . put ( "medium" , TPSettings . T...
public class StatementManager { /** * returns an array containing values for all the Objects attribute * @ throws PersistenceBrokerException if there is an erros accessing obj field values */ protected ValueContainer [ ] getAllValues ( ClassDescriptor cld , Object obj ) throws PersistenceBrokerException { } }
return m_broker . serviceBrokerHelper ( ) . getAllRwValues ( cld , obj ) ;
public class CacheImpl { /** * The asynchronous method of { @ link # executeCommandWithInjectedTx ( InvocationContext , VisitableCommand ) } */ private < T > CompletableFuture < T > executeCommandAsyncWithInjectedTx ( InvocationContext ctx , VisitableCommand command ) { } }
CompletableFuture < T > cf ; final Transaction implicitTransaction ; try { // interceptors must not access thread - local transaction anyway implicitTransaction = transactionManager . suspend ( ) ; assert implicitTransaction != null ; // noinspection unchecked cf = ( CompletableFuture < T > ) invoker . invokeAsync ( ct...
public class ObjectArrayList { /** * Removes from the receiver all elements that are contained in the specified list . * Tests for equality or identity as specified by < code > testForEquality < / code > . * @ param other the other list . * @ param testForEquality if < code > true < / code > - > test for equality...
if ( other . size == 0 ) return false ; // nothing to do int limit = other . size - 1 ; int j = 0 ; Object [ ] theElements = elements ; for ( int i = 0 ; i < size ; i ++ ) { if ( other . indexOfFromTo ( theElements [ i ] , 0 , limit , testForEquality ) < 0 ) theElements [ j ++ ] = theElements [ i ] ; } boolean modified...
public class ServletTypeImpl { /** * If not already created , a new < code > run - as < / code > element with the given value will be created . * Otherwise , the existing < code > run - as < / code > element will be returned . * @ return a new or existing instance of < code > RunAsType < ServletType < T > > < / cod...
Node node = childNode . getOrCreate ( "run-as" ) ; RunAsType < ServletType < T > > runAs = new RunAsTypeImpl < ServletType < T > > ( this , "run-as" , childNode , node ) ; return runAs ;
public class ClassFeatureSet { /** * Figure out if a class member ( field or method ) is synthetic . * @ param member * a field or method * @ return true if the member is synthetic */ private boolean isSynthetic ( FieldOrMethod member ) { } }
if ( BCELUtil . isSynthetic ( member ) ) { return true ; } String name = member . getName ( ) ; return name . startsWith ( "class$" ) || name . startsWith ( "access$" ) ;
public class ImageLoading { /** * Calculating scale factor with limit of pixel amount * @ param metadata image metadata * @ param maxPixels limit for pixels * @ return scale factor */ private static int getScaleFactor ( ImageMetadata metadata , int maxPixels ) { } }
int scale = 1 ; int scaledW = metadata . getW ( ) ; int scaledH = metadata . getH ( ) ; while ( scaledW * scaledH > maxPixels ) { scale *= 2 ; scaledH /= 2 ; scaledW /= 2 ; } return scale ;
public class ASN1Set { /** * return true if a < = b ( arrays are assumed padded with zeros ) . */ private boolean lessThanOrEqual ( byte [ ] a , byte [ ] b ) { } }
if ( a . length <= b . length ) { for ( int i = 0 ; i != a . length ; i ++ ) { int l = a [ i ] & 0xff ; int r = b [ i ] & 0xff ; if ( r > l ) { return true ; } else if ( l > r ) { return false ; } } return true ; } else { for ( int i = 0 ; i != b . length ; i ++ ) { int l = a [ i ] & 0xff ; int r = b [ i ] & 0xff ; if ...
public class JobTargetGroupsInner { /** * Gets all target groups in an agent . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; JobTargetGroupInne...
return listByAgentNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < JobTargetGroupInner > > , Page < JobTargetGroupInner > > ( ) { @ Override public Page < JobTargetGroupInner > call ( ServiceResponse < Page < JobTargetGroupInner > > response ) { return response . body ( ) ; } }...
public class ResourcesInner { /** * Updates a resource . * @ param resourceGroupName The name of the resource group for the resource . The name is case insensitive . * @ param resourceProviderNamespace The namespace of the resource provider . * @ param parentResourcePath The parent resource identity . * @ param...
return updateWithServiceResponseAsync ( resourceGroupName , resourceProviderNamespace , parentResourcePath , resourceType , resourceName , apiVersion , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class ReplicaReader { /** * Perform replica reads to as many nodes a possible based on the given { @ link ReplicaMode } . * Individual errors are swallowed , but logged . * @ param core the core reference . * @ param id the id of the document to load from the replicas . * @ param type the replica mode ty...
return Observable . defer ( new Func0 < Observable < D > > ( ) { @ Override public Observable < D > call ( ) { final Span parentSpan ; if ( environment . operationTracingEnabled ( ) ) { Scope scope = environment . tracer ( ) . buildSpan ( "get_from_replica" ) . startActive ( false ) ; parentSpan = scope . span ( ) ; sc...
public class Int2ObjectHashMap { /** * Get a value for a given key , or if it does ot exist then default the value via a { @ link IntFunction } * and put it in the map . * @ param key to search on . * @ param mappingFunction to provide a value if the get returns null . * @ return the value if found otherwise th...
checkNotNull ( mappingFunction , "mappingFunction cannot be null" ) ; V value = get ( key ) ; if ( value == null ) { value = mappingFunction . apply ( key ) ; if ( value != null ) { put ( key , value ) ; } } return value ;
public class ImmutableGrid { /** * Obtains an empty immutable grid of the specified row - column count . * @ param < R > the type of the value * @ param rowCount the number of rows , zero or greater * @ param columnCount the number of columns , zero or greater * @ return the empty immutable grid , not null */ p...
return new EmptyGrid < R > ( rowCount , columnCount ) ;
public class N { /** * Returns an immutable empty < code > Iterator < / code > if the specified Iterator is < code > null < / code > , otherwise itself is returned . * @ param iter * @ return */ public static < T > Iterator < T > nullToEmpty ( final Iterator < T > iter ) { } }
return iter == null ? N . < T > emptyIterator ( ) : iter ;
public class WildcardPattern { /** * Creates array of patterns with " / " as a directory separator . * @ see # create ( String , String ) */ public static WildcardPattern [ ] create ( @ Nullable String [ ] patterns ) { } }
if ( patterns == null ) { return new WildcardPattern [ 0 ] ; } WildcardPattern [ ] exclusionPAtterns = new WildcardPattern [ patterns . length ] ; for ( int i = 0 ; i < patterns . length ; i ++ ) { exclusionPAtterns [ i ] = create ( patterns [ i ] ) ; } return exclusionPAtterns ;
public class ObjectAnimator { /** * Constructs and returns an ObjectAnimator that animates between int values . A single * value implies that that value is the one being animated to . Two values imply a starting * and ending values . More than two values imply a starting value , values to animate through * along ...
ObjectAnimator anim = new ObjectAnimator ( target , propertyName ) ; anim . setIntValues ( values ) ; return anim ;
public class TypeDeclarationGenerator { /** * Prints the list of instance variables in a type . */ protected void printInstanceVariables ( ) { } }
Iterable < VariableDeclarationFragment > fields = getInstanceFields ( ) ; if ( Iterables . isEmpty ( fields ) ) { newline ( ) ; return ; } // Need direct access to fields possibly from inner classes that are // promoted to top level classes , so must make all visible fields public . println ( " {" ) ; println ( " @publ...
public class AbstractSingleFileObjectStore { /** * Sets the size of the store file to the new values . * At least the minimum space is reserved in the file system . * No more than the maximum number of bytes will be used . * Blocks until this has completed . * The initial values used by the ObjecStore are 0 and...
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setStoreFileSize" , new Object [ ] { new Long ( newMinimumStoreFileSize ) , new Long ( newMaximumStoreFileSize ) } ) ; // Synchronized so we have locked out flush ( ) ; if ( newMinimumStoreFileSize > newMaximumStoreF...
public class QueryParserKraken { /** * Parses the update . * UPDATE table _ name SET a = ? , b = ? WHERE expr */ private QueryBuilderKraken parseUpdate ( ) { } }
Token token ; UpdateQueryBuilder query = new UpdateQueryBuilder ( _tableManager , _sql ) ; String tableName = parseTableName ( ) ; query . setTableName ( tableName ) ; _query = query ; if ( ( token = scanToken ( ) ) != Token . SET ) { throw error ( L . l ( "expected SET at {0}" , token ) ) ; } do { parseSetItem ( query...
public class CamelModelHelper { /** * Returns the summary label of a node for visualisation purposes */ public static String getDisplayText ( OptionalIdentifiedDefinition camelNode ) { } }
String id = camelNode . getId ( ) ; if ( ! Strings2 . isEmpty ( id ) ) { return id ; } if ( camelNode instanceof FromDefinition ) { FromDefinition node = ( FromDefinition ) camelNode ; return getUri ( node ) ; } else if ( camelNode instanceof ToDefinition ) { ToDefinition node = ( ToDefinition ) camelNode ; return getU...
public class BaseLayoutManager { /** * Used for debugging . * Validates that child views are laid out in correct order . This is important because rest of * the algorithm relies on this constraint . * In default layout , child 0 should be closest to screen position 0 and last child should be * closest to positi...
Log . d ( TAG , "validating child count " + getChildCount ( ) ) ; if ( getChildCount ( ) < 1 ) { return ; } int lastPos = getPosition ( getChildAt ( 0 ) ) ; int lastScreenLoc = mOrientationHelper . getDecoratedStart ( getChildAt ( 0 ) ) ; if ( mShouldReverseLayout ) { for ( int i = 1 ; i < getChildCount ( ) ; i ++ ) { ...
public class StreamletImpl { /** * Same as filter ( Identity ) . setNumPartitions ( nPartitions ) */ @ Override public Streamlet < R > repartition ( int numPartitions ) { } }
return this . map ( ( a ) -> a ) . setNumPartitions ( numPartitions ) ;
public class QueryLexer { /** * $ ANTLR end " HexDigit " */ public void mTokens ( ) throws RecognitionException { } }
// src / riemann / Query . g : 1:8 : ( AND | OR | NOT | APPROXIMATELY | REGEX _ MATCH | NOT _ EQUAL | EQUAL | LESSER | LESSER _ EQUAL | GREATER | GREATER _ EQUAL | TAGGED | T _ _ 25 | T _ _ 26 | T _ _ 27 | T _ _ 28 | T _ _ 29 | T _ _ 30 | T _ _ 31 | T _ _ 32 | T _ _ 33 | T _ _ 34 | T _ _ 35 | T _ _ 36 | T _ _ 37 | T _ ...
public class JmsJcaManagedConnectionFactoryImpl { /** * Creates a managed connection . * @ param subject * the subject * @ param requestInfo * the request information * @ return the managed connection * @ throws ResourceException * generic exception */ @ Override final public ManagedConnection createManag...
if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "createManagedConnection" , new Object [ ] { JmsJcaManagedConnection . subjectToString ( subject ) , requestInfo } ) ; } // If we have some request information then see if it already has a core // connection a...
public class PerformanceMetricsMarshaller { /** * Marshall the given parameter object . */ public void marshall ( PerformanceMetrics performanceMetrics , ProtocolMarshaller protocolMarshaller ) { } }
if ( performanceMetrics == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( performanceMetrics . getProperties ( ) , PROPERTIES_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . ...
public class Bits { /** * Reads a string from buf . The length is read first , followed by the chars . Each char is a single byte * @ param buf the buffer * @ return the string read from buf */ public static String readString ( ByteBuffer buf ) { } }
if ( buf . get ( ) == 0 ) return null ; int len = readInt ( buf ) ; if ( buf . isDirect ( ) ) { byte [ ] bytes = new byte [ len ] ; buf . get ( bytes ) ; return new String ( bytes ) ; } else { byte [ ] bytes = buf . array ( ) ; return new String ( bytes , buf . arrayOffset ( ) + buf . position ( ) , len ) ; }
public class ChunkAnnotationUtils { /** * Create a new chunk Annotation with basic chunk information * CharacterOffsetBeginAnnotation - set to CharacterOffsetBeginAnnotation of first token in chunk * CharacterOffsetEndAnnotation - set to CharacterOffsetEndAnnotation of last token in chunk * TokensAnnotation - Lis...
Annotation chunk = getAnnotatedChunk ( annotation , tokenStartIndex , tokenEndIndex ) ; annotateChunkTokens ( chunk , tokenChunkKey , tokenLabelKey ) ; return chunk ;
public class Transaction { /** * < p > Puts the given block in the internal set of blocks in which this transaction appears . This is * used by the wallet to ensure transactions that appear on side chains are recorded properly even though the * block stores do not save the transaction data at all . < / p > * < p ...
long blockTime = block . getHeader ( ) . getTimeSeconds ( ) * 1000 ; if ( bestChain && ( updatedAt == null || updatedAt . getTime ( ) == 0 || updatedAt . getTime ( ) > blockTime ) ) { updatedAt = new Date ( blockTime ) ; } addBlockAppearance ( block . getHeader ( ) . getHash ( ) , relativityOffset ) ; if ( bestChain ) ...
public class FieldValueMappingCallback { /** * Resolves a field ' s value via the { @ link FieldValueMappingCallback . FieldData # path field path } . * Supports conversion from array properties ( such as String [ ] ) to the desired collection type of the field . * @ return the resolved value , or < code > null < /...
Object value ; if ( field . metaData . isInstantiableCollectionType ( ) ) { value = getArrayPropertyAsCollection ( field ) ; } else { value = resolvePropertyTypedValue ( field , field . metaData . getType ( ) ) ; } return value ;
public class NetUtil { /** * Gets the InputStream from a given URL , with the given timeout . * The timeout must be > 0 . A timeout of zero is interpreted as an * infinite timeout . Supports basic HTTP * authentication , using a URL string similar to most browsers . * < SMALL > Implementation note : If the time...
pProperties = pProperties != null ? pProperties : new Properties ( ) ; // URL url = getURLAndRegisterPassword ( pURL ) ; URL url = getURLAndSetAuthorization ( pURL , pProperties ) ; // unregisterPassword ( url ) ; return getInputStreamHttpPost ( url , pPostData , pProperties , pFollowRedirects , pTimeout ) ;
public class OptionsBuilder { /** * Adds a step to the steps . * @ param name { @ link String } name of the step * @ param robot { @ link String } name of the robot used by the step . * @ param options { @ link Map } extra options required for the step . */ public void addStep ( String name , String robot , Map <...
steps . addStep ( name , robot , options ) ;
public class Roster { /** * Ignore ItemTypes as of RFC 6121 , 2.1.2.5. * This is used by { @ link RosterPushListener } and { @ link RosterResultListener } . */ private static boolean hasValidSubscriptionType ( RosterPacket . Item item ) { } }
switch ( item . getItemType ( ) ) { case none : case from : case to : case both : return true ; default : return false ; }
public class CsvReader { public void sortRowsForIndexByType ( int index , DataType dataType ) { } }
Comparator < List < String > > comparator = null ; switch ( dataType ) { case Long : { comparator = ( list1 , list2 ) -> Long . valueOf ( list1 . get ( 0 ) ) . compareTo ( Long . valueOf ( list2 . get ( 0 ) ) ) ; } break ; default : comparator = ( list1 , list2 ) -> list1 . get ( 0 ) . compareTo ( list2 . get ( 0 ) ) ;...
public class RatingInputWidget { /** * Checks if a error belongs to this widget . * @ param perror editor error to check * @ return true if the error belongs to this widget */ protected boolean editorErrorMatches ( final EditorError perror ) { } }
return perror != null && perror . getEditor ( ) != null && ( equals ( perror . getEditor ( ) ) || perror . getEditor ( ) . equals ( asEditor ( ) ) ) ;
public class CmsRemoveOldDbLogEntriesJob { /** * Parses the ' max - age ' parameter and returns a value in hours . < p > * @ param maxAgeStr the value of the ' max - age ' parameter * @ return the maximum age in hours */ public int parseMaxAge ( String maxAgeStr ) { } }
if ( maxAgeStr == null ) { showFormatError ( maxAgeStr ) ; return - 1 ; } maxAgeStr = maxAgeStr . toLowerCase ( ) . trim ( ) ; String [ ] tokens = maxAgeStr . split ( " +" ) ; if ( ( tokens . length != 2 ) ) { showFormatError ( maxAgeStr ) ; return - 1 ; } int number = 0 ; try { number = Integer . parseInt ( tokens [ 0...