signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class DerivedQueryCreator { /** * Builds a full AQL query from a built Disjunction , additional information from PartTree and special parameters * caught by ArangoParameterAccessor * @ param criteria * @ param sort * @ return */ @ Override protected String complete ( final Criteria criteria , final Sort ...
if ( tree . isDistinct ( ) && ! tree . isCountProjection ( ) ) { LOGGER . debug ( "Use of 'Distinct' is meaningful only in count queries" ) ; } final StringBuilder query = new StringBuilder ( ) ; final String with = withCollections . stream ( ) . collect ( Collectors . joining ( ", " ) ) ; if ( ! with . isEmpty ( ) ) {...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcCondenserTypeEnum createIfcCondenserTypeEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcCondenserTypeEnum result = IfcCondenserTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class CmsPrincipalSelectionList { /** * Returns if the list of principals has principals of other organizational units . < p > * @ return if the list of principals has principals of other organizational units */ public boolean hasPrincipalsInOtherOus ( ) { } }
if ( m_hasPrincipalsInOtherOus == null ) { // lazzy initialization m_hasPrincipalsInOtherOus = Boolean . FALSE ; try { Iterator < CmsPrincipal > itPrincipals = getPrincipals ( true ) . iterator ( ) ; while ( itPrincipals . hasNext ( ) ) { CmsPrincipal principal = itPrincipals . next ( ) ; if ( ! principal . getOuFqn ( ...
public class FileTag { /** * read source file * @ throws PageException */ public void actionUpload ( ) throws PageException { } }
FormItem item = getFormItem ( pageContext , filefield ) ; Struct cffile = _actionUpload ( pageContext , securityManager , item , strDestination , nameconflict , accept , strict , mode , attributes , acl , serverPassword ) ; if ( StringUtil . isEmpty ( result ) ) { pageContext . undefinedScope ( ) . set ( KeyConstants ....
public class CrystalTransform { /** * helper function to format simple fractions into rationals * @ param coef * @ return */ private String formatCoef ( double coef ) { } }
double tol = 1e-6 ; // rounding tolerance // zero case if ( Math . abs ( coef ) < tol ) { return "0" ; } // integer case long num = Math . round ( coef ) ; if ( Math . abs ( num - coef ) < tol ) { return Long . toString ( num ) ; } // Other small cases for ( int denom = 2 ; denom < 12 ; denom ++ ) { num = Math . round ...
public class ApiTokenClient { /** * Creates a new data store . * @ param file CSV file that should be uploaded ( N . B . max 50MB ) * @ param name name to use in the Load Impact web - console * @ param fromline Payload from this line ( 1st line is 1 ) . Set to value 2 , if the CSV file starts with a headings line...
return invoke ( DATA_STORES , new RequestClosure < JsonObject > ( ) { @ Override public JsonObject call ( Invocation . Builder request ) { MultiPart form = new FormDataMultiPart ( ) . field ( "name" , name ) . field ( "fromline" , Integer . toString ( fromline ) ) . field ( "separator" , separator . param ( ) ) . field...
public class JavaCompilerMojo { /** * Checks whether or not an event on the given file should trigger the Java compilation . * @ param file the file * @ return { @ literal true } if the given file is a JAva file and is contained in the Java source directory . */ @ Override public boolean accept ( File file ) { } }
return WatcherUtils . isInDirectory ( file , WatcherUtils . getJavaSource ( basedir ) ) ;
public class Discover { /** * Filter the results release dates to matches that include this value . * @ param year * @ return */ public Discover year ( int year ) { } }
if ( checkYear ( year ) ) { params . add ( Param . YEAR , year ) ; } return this ;
public class ApplicationCache { /** * Adds the label to the applications for the account . * @ param label The label to add */ public void addLabel ( Label label ) { } }
// Add the label to any applications it is associated with List < Long > applicationIds = label . getLinks ( ) . getApplications ( ) ; for ( long applicationId : applicationIds ) { Application application = applications . get ( applicationId ) ; if ( application != null ) labels ( applicationId ) . add ( label ) ; else...
public class PrimaveraPMFileWriter { /** * Writes an activity to a PM XML file . * @ param mpxj MPXJ Task instance */ private void writeActivity ( Task mpxj ) { } }
ActivityType xml = m_factory . createActivityType ( ) ; m_project . getActivity ( ) . add ( xml ) ; Task parentTask = mpxj . getParentTask ( ) ; Integer parentObjectID = parentTask == null ? null : parentTask . getUniqueID ( ) ; xml . setActualStartDate ( mpxj . getActualStart ( ) ) ; xml . setActualFinishDate ( mpxj ....
public class ParametersAction { /** * Allow an other build of the same project to be scheduled , if it has other parameters . */ public boolean shouldSchedule ( List < Action > actions ) { } }
List < ParametersAction > others = Util . filter ( actions , ParametersAction . class ) ; if ( others . isEmpty ( ) ) { return ! parameters . isEmpty ( ) ; } else { // I don ' t think we need multiple ParametersActions , but let ' s be defensive Set < ParameterValue > params = new HashSet < > ( ) ; for ( ParametersActi...
public class CRF { /** * Returns the most likely label sequence given the feature sequence by the * forward - backward algorithm . * @ param x a sequence of sparse features taking values in [ 0 , p ) about each * position of original sequence , where p is the number of features . * @ return the most likely labe...
int n = x . length ; // length of sequence TrellisNode [ ] [ ] trellis = getTrellis ( x ) ; double [ ] scaling = new double [ n ] ; forward ( trellis , scaling ) ; backward ( trellis ) ; int [ ] label = new int [ n ] ; double [ ] p = new double [ numClasses ] ; for ( int i = 0 ; i < n ; i ++ ) { TrellisNode [ ] ti = tr...
public class BmrClient { /** * List the instances belonging to the target instance in the BMR cluster . * @ param clusterId the ID of target BMR cluster . * @ param instanceGroupId the ID of target instance group . * @ return The response containing a list of Instance objects . */ public ListInstancesResponse lis...
return listInstances ( new ListInstancesRequest ( ) . withClusterId ( clusterId ) . withInstanceGroupId ( instanceGroupId ) ) ;
public class Descriptors { /** * Creates a { @ link FilterDescriptor } for a filter class . * @ param < F > * @ param < C > * @ param filterClass * @ return */ public static < F extends Filter < C > , C extends Enum < C > > FilterDescriptor < F , C > ofFilter ( final Class < F > filterClass ) { } }
return new AnnotationBasedFilterComponentDescriptor < > ( filterClass ) ;
public class XMLSerializer { /** * For maximum efficiency when writing indents the required output is * pre - computed This is internal function that recomputes buffer after user * requested chnages . */ protected void rebuildIndentationBuf ( ) { } }
if ( doIndent == false ) return ; final int maxIndent = 65 ; // hardcoded maximum indentation size in // characters int bufSize = 0 ; offsetNewLine = 0 ; if ( writeLineSepartor ) { offsetNewLine = lineSeparator . length ( ) ; bufSize += offsetNewLine ; } maxIndentLevel = 0 ; if ( writeIndentation ) { indentationJump = ...
public class JobConf { /** * Set the maximum amount of memory any task of this job can use . See * { @ link # MAPRED _ TASK _ MAXVMEM _ PROPERTY } * mapred . task . maxvmem is split into * mapred . job . map . memory . mb * and mapred . job . map . memory . mb , mapred * each of the new key are set * as map...
LOG . warn ( "setMaxVirtualMemoryForTask() is deprecated." + "Instead use setMemoryForMapTask() and setMemoryForReduceTask()" ) ; if ( vmem != DISABLED_MEMORY_LIMIT && vmem < 0 ) { setMemoryForMapTask ( DISABLED_MEMORY_LIMIT ) ; setMemoryForReduceTask ( DISABLED_MEMORY_LIMIT ) ; } if ( get ( JobConf . MAPRED_TASK_MAXVM...
public class VirtualNetworkGatewaysInner { /** * Creates or updates a virtual network gateway in the specified resource group . * @ param resourceGroupName The name of the resource group . * @ param virtualNetworkGatewayName The name of the virtual network gateway . * @ param parameters Parameters supplied to cre...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class Grammar { /** * Adds new rule if the same rule doesn ' t exist already . * @ param reducer Reducer method . * @ param nonterminal Left hand side of the rule . * @ param rhs Strings which are either nonterminal names , terminal names or * anonymous terminals . Anonymous terminals are regular express...
Grammar . R rule = new Grammar . R ( nonterminal , rhs , reducer , document , synthetic ) ; if ( ! ruleSet . contains ( rule ) ) { rule . number = ruleNumber ++ ; ruleSet . add ( rule ) ; lhsMap . add ( nonterminal , rule ) ; if ( ! nonterminalMap . containsKey ( nonterminal ) ) { Grammar . NT nt = new Grammar . NT ( n...
public class ESClient { /** * Sets the refresh indexes . * @ param puProps * the pu props * @ param externalProperties * the external properties */ private void setRefreshIndexes ( Properties puProps , Map < String , Object > externalProperties ) { } }
Object refreshIndexes = null ; /* * Check from properties set while creating emf */ if ( externalProperties . get ( ESConstants . KUNDERA_ES_REFRESH_INDEXES ) != null ) { refreshIndexes = externalProperties . get ( ESConstants . KUNDERA_ES_REFRESH_INDEXES ) ; } /* * Check from PU Properties */ if ( refreshIndexes == nu...
public class ThreadLocalMappedDiagnosticContext { /** * Get the context identified by the < code > key < / code > parameter . */ @ Override public String get ( String key ) { } }
Map < String , String > map = inheritableThreadLocal . get ( ) ; if ( ( map != null ) && ( key != null ) ) { return map . get ( key ) ; } else { return null ; }
public class TangramBuilder { /** * init a { @ link TangramEngine } builder with build - in resource inited , such as registering build - in card and cell . Users use this builder to regiser custom card and cell , then call { @ link InnerBuilder # build ( ) } to create a { @ link TangramEngine } instance . * @ param ...
if ( ! TangramBuilder . isInitialized ( ) ) { throw new IllegalStateException ( "Tangram must be init first" ) ; } DefaultResolverRegistry registry = new DefaultResolverRegistry ( ) ; // install default cards & mCells installDefaultRegistry ( registry ) ; return new InnerBuilder ( context , registry ) ;
public class IPRangeCollection { /** * performs a binary search over sorted list * @ param addr * @ return */ public IPRangeNode findFast ( String addr ) { } }
InetAddress iaddr ; try { iaddr = InetAddress . getByName ( addr ) ; } catch ( UnknownHostException ex ) { return null ; } return findFast ( iaddr ) ;
public class BugLoader { /** * Performs an analysis and returns the BugSet created * @ param p * The Project to run the analysis on * @ param progressCallback * the progressCallBack is supposed to be supplied by analyzing * dialog , FindBugs supplies progress information while it runs * the analysis * @ r...
StringWriter stringWriter = new StringWriter ( ) ; BugCollectionBugReporter pcb = new BugCollectionBugReporter ( p , new PrintWriter ( stringWriter , true ) ) ; pcb . setPriorityThreshold ( Priorities . LOW_PRIORITY ) ; IFindBugsEngine fb = createEngine ( p , pcb ) ; fb . setUserPreferences ( getUserPreferences ( ) ) ;...
public class OutputPropertiesFactory { /** * Creates an empty OutputProperties with the property key / value defaults specified by * a property file . The method argument is used to construct a string of * the form output _ [ method ] . properties ( for instance , output _ html . properties ) . * The output _ xml...
String fileName = null ; Properties defaultProperties = null ; // According to this article : Double - check locking does not work // http : / / www . javaworld . com / javaworld / jw - 02-2001 / jw - 0209 - toolbox . html try { synchronized ( m_synch_object ) { if ( null == m_xml_properties ) // double check { fileNam...
public class RuntimePermissionUtils { /** * Returns true if the context has access to any given permissions . */ private static boolean hasSelfPermissions ( Context context , String ... permissions ) { } }
for ( String permission : permissions ) { if ( checkSelfPermission ( context , permission ) == PackageManager . PERMISSION_GRANTED ) { return true ; } } return false ;
public class AppServicePlansInner { /** * Gets all selectable sku ' s for a given App Service Plan . * Gets all selectable sku ' s for a given App Service Plan . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of App Service Plan * @ throws IllegalArgum...
return getServerFarmSkusWithServiceResponseAsync ( resourceGroupName , name ) . map ( new Func1 < ServiceResponse < Object > , Object > ( ) { @ Override public Object call ( ServiceResponse < Object > response ) { return response . body ( ) ; } } ) ;
public class Roster { /** * Creates a new roster item . The server will asynchronously update the roster with the subscription status . * There will be no presence subscription request . Consider using * { @ link # createItemAndRequestSubscription ( BareJid , String , String [ ] ) } if you also want to request a pr...
final XMPPConnection connection = getAuthenticatedConnectionOrThrow ( ) ; // Create and send roster entry creation packet . RosterPacket rosterPacket = new RosterPacket ( ) ; rosterPacket . setType ( IQ . Type . set ) ; RosterPacket . Item item = new RosterPacket . Item ( jid , name ) ; if ( groups != null ) { for ( St...
public class GrailsASTUtils { /** * Determines if the class or interface represented by the superClass * argument is either the same as , or is a superclass or superinterface of , * the class or interface represented by the specified subClass parameter . * @ param superClass The super class to check * @ param c...
ClassNode currentSuper = childClass ; while ( currentSuper != null ) { if ( currentSuper . equals ( superClass ) ) { return true ; } currentSuper = currentSuper . getSuperClass ( ) ; } return false ;
public class BeanDefinitionParserUtils { /** * Creates new bean definition from bean class and registers new bean in parser registry . * Returns bean definition holder . * @ param beanId * @ param beanClass * @ param parserContext * @ param shouldFireEvents */ public static BeanDefinitionHolder registerBean (...
return registerBean ( beanId , BeanDefinitionBuilder . genericBeanDefinition ( beanClass ) . getBeanDefinition ( ) , parserContext , shouldFireEvents ) ;
public class AccuracyWeightedEnsemble { /** * Predicts a class for an example . */ public double [ ] getVotesForInstance ( Instance inst ) { } }
DoubleVector combinedVote = new DoubleVector ( ) ; if ( this . trainingWeightSeenByModel > 0.0 ) { for ( int i = 0 ; i < this . ensemble . length ; i ++ ) { if ( this . ensembleWeights [ i ] > 0.0 ) { DoubleVector vote = new DoubleVector ( this . ensemble [ i ] . getVotesForInstance ( inst ) ) ; if ( vote . sumOfValues...
public class MathBindings { /** * Binding for { @ link java . lang . Math # subtractExact ( int , int ) } * @ param x the first value * @ param y the second value to subtract from the first * @ return the result * @ throws ArithmeticException if the result overflows an int */ public static IntegerBinding subtra...
return createIntegerBinding ( ( ) -> Math . subtractExact ( x , y . get ( ) ) , y ) ;
public class DBInitializerHelper { /** * Initialization script for root node . */ public static String getRootNodeInitializeScript ( String itemTableName , boolean multiDb ) { } }
String singeDbScript = "insert into " + itemTableName + "(ID, PARENT_ID, NAME, CONTAINER_NAME, VERSION, I_CLASS, I_INDEX, " + "N_ORDER_NUM) VALUES('" + Constants . ROOT_PARENT_UUID + "', '" + Constants . ROOT_PARENT_UUID + "', '" + Constants . ROOT_PARENT_NAME + "', '" + Constants . ROOT_PARENT_CONAINER_NAME + "', 0, 0...
public class dnsaaaarec { /** * Use this API to delete dnsaaaarec . */ public static base_response delete ( nitro_service client , dnsaaaarec resource ) throws Exception { } }
dnsaaaarec deleteresource = new dnsaaaarec ( ) ; deleteresource . hostname = resource . hostname ; deleteresource . ipv6address = resource . ipv6address ; return deleteresource . delete_resource ( client ) ;
public class ElasticHashinator { /** * Convenience method for generating a deterministic token distribution for the ring based * on a given partition count and tokens per partition . Each partition will have N tokens * placed randomly on the ring . */ public static byte [ ] getConfigureBytes ( int partitionCount , ...
Preconditions . checkArgument ( partitionCount > 0 ) ; Preconditions . checkArgument ( tokenCount > partitionCount ) ; Buckets buckets = new Buckets ( partitionCount , tokenCount ) ; ElasticHashinator hashinator = new ElasticHashinator ( buckets . getTokens ( ) ) ; return hashinator . getConfigBytes ( ) ;
public class EthiopicChronology { /** * Gets an instance of the EthiopicChronology in the given time zone . * @ param zone the time zone to get the chronology in , null is default * @ param minDaysInFirstWeek minimum number of days in first week of the year ; default is 4 * @ return a chronology in the specified ...
if ( zone == null ) { zone = DateTimeZone . getDefault ( ) ; } EthiopicChronology chrono ; EthiopicChronology [ ] chronos = cCache . get ( zone ) ; if ( chronos == null ) { chronos = new EthiopicChronology [ 7 ] ; EthiopicChronology [ ] oldChronos = cCache . putIfAbsent ( zone , chronos ) ; if ( oldChronos != null ) { ...
public class TwoDScrollView { /** * < p > Handles scrolling in response to a " home / end " shortcut press . This * method will scroll the view to the top or bottom and give the focus * to the topmost / bottommost component in the new visible area . If no * component is a good candidate for focus , this scrollvie...
if ( ! horizontal ) { boolean down = direction == View . FOCUS_DOWN ; int height = getHeight ( ) ; mTempRect . top = 0 ; mTempRect . bottom = height ; if ( down ) { int count = getChildCount ( ) ; if ( count > 0 ) { View view = getChildAt ( count - 1 ) ; mTempRect . bottom = view . getBottom ( ) ; mTempRect . top = mTe...
public class GetResourceMetricsResult { /** * An array of metric results , , where each array element contains all of the data points for a particular dimension . * @ param metricList * An array of metric results , , where each array element contains all of the data points for a particular * dimension . */ public...
if ( metricList == null ) { this . metricList = null ; return ; } this . metricList = new java . util . ArrayList < MetricKeyDataPoints > ( metricList ) ;
public class Binding { /** * < pre > * Role that is assigned to ` members ` . * For example , ` roles / viewer ` , ` roles / editor ` , or ` roles / owner ` . * Required * < / pre > * < code > string role = 1 ; < / code > */ public com . google . protobuf . ByteString getRoleBytes ( ) { } }
java . lang . Object ref = role_ ; if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; role_ = b ; return b ; } else { return ( com . google . protobuf . ByteString ) ref ; }
public class LittleEndianSerializerDataOutputStream { /** * Writes an { @ code int } as specified by * { @ link DataOutputStream # writeInt ( int ) } , except using little - endian byte * order . * @ throws IOException * if an I / O error occurs */ @ Override public void writeInt ( int v ) throws IOException { ...
outputStream . write ( 0xFF & v ) ; outputStream . write ( 0xFF & ( v >> 8 ) ) ; outputStream . write ( 0xFF & ( v >> 16 ) ) ; outputStream . write ( 0xFF & ( v >> 24 ) ) ; bytesWritten += 4 ;
public class NodeUtil { /** * Whether the given name is constant by coding convention . */ static boolean isConstantByConvention ( CodingConvention convention , Node node ) { } }
Node parent = node . getParent ( ) ; if ( parent . isGetProp ( ) && node == parent . getLastChild ( ) ) { return convention . isConstantKey ( node . getString ( ) ) ; } else if ( mayBeObjectLitKey ( node ) ) { return convention . isConstantKey ( node . getString ( ) ) ; } else if ( node . isName ( ) ) { return conventi...
public class DeveloperUtilitiesServiceProgrammatic { public Clob downloadLayout ( final Object domainObject ) { } }
final ObjectAdapter adapterFor = adapterManager . adapterFor ( domainObject ) ; final ObjectSpecification objectSpec = adapterFor . getSpecification ( ) ; final LayoutJsonExporter exporter = new LayoutJsonExporter ( ) ; final String json = exporter . asJson ( objectSpec ) ; return new Clob ( objectSpec . getShortIdenti...
public class Record { /** * Returns the { @ code column ' s } byte array data contained in { @ code buffer } . * @ param buffer { @ code byte [ ] } ; must be non - null and of the same length as * { @ link # getRecordSize ( ) } * @ param column Column to read * @ return { @ code byte [ ] } * @ throws InvalidA...
if ( buffer == null ) { throw new InvalidArgument ( "buffer" , buffer ) ; } else if ( buffer . length != recordSize ) { final String fmt = "invalid buffer (%d bytes, expected %d)" ; final String msg = format ( fmt , buffer . length , recordSize ) ; throw new InvalidArgument ( msg ) ; } int i = 0 , offset = 0 ; for ( ; ...
public class MainActivity { /** * This animation was intended to keep a pressed state of the Drawable * @ return Animation */ private Animator preparePressedAnimation ( ) { } }
Animator animation = ObjectAnimator . ofFloat ( drawable , CircularProgressDrawable . CIRCLE_SCALE_PROPERTY , drawable . getCircleScale ( ) , 0.65f ) ; animation . setDuration ( 120 ) ; return animation ;
public class CSVTableSaveFile { /** * Returns a more CSV data in UTF - 8 format . Returns null when there is no * more data . May block . * @ return null if there is no more data or a byte array contain some number * of complete CSV lines * @ throws IOException */ public byte [ ] read ( ) throws IOException { }...
if ( m_exception . get ( ) != null ) { throw m_exception . get ( ) ; } byte bytes [ ] = null ; if ( m_activeConverters . get ( ) == 0 ) { bytes = m_available . poll ( ) ; } else { try { bytes = m_available . take ( ) ; } catch ( InterruptedException e ) { throw new IOException ( e ) ; } } if ( bytes != null ) { m_avail...
public class OptimizeParameters { /** * This reference set is a candidate for parameter - moving if : * - if all call sites are known ( no aliasing ) * - if all definition sites are known ( the possible values are known functions ) * - there is at least one definition */ private boolean isCandidate ( String name ...
if ( ! OptimizeCalls . mayBeOptimizableName ( compiler , name ) ) { return false ; } boolean seenCandidateDefiniton = false ; boolean seenCandidateUse = false ; for ( Node n : refs ) { // TODO ( johnlenz ) : Determine what to do about " . constructor " references . // Currently classes that are super classes or have su...
public class TextToSpeech { /** * List custom words . * Lists all of the words and their translations for the specified custom voice model . The output shows the * translations as they are defined in the model . You must use credentials for the instance of the service that owns a * model to list its words . * *...
Validator . notNull ( listWordsOptions , "listWordsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "words" } ; String [ ] pathParameters = { listWordsOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , path...
public class AgentLoader { /** * Returns process id . Note that Java does not guarantee any format for id , * so this is just a common heuristic . * @ return Current process id */ private static String getPID ( ) { } }
String vmName = ManagementFactory . getRuntimeMXBean ( ) . getName ( ) ; return vmName . substring ( 0 , vmName . indexOf ( "@" ) ) ;
public class WFieldRenderer { /** * Paints the given WField . * @ param component the WField to paint . * @ param renderContext the RenderContext to paint to . */ @ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } }
WField field = ( WField ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; int inputWidth = field . getInputWidth ( ) ; xml . appendTagOpen ( "ui:field" ) ; xml . appendAttribute ( "id" , component . getId ( ) ) ; xml . appendOptionalAttribute ( "class" , component . getHtmlClass ( ) ) ; xml . appendO...
public class ArquillianDescriptorImpl { /** * / * ( non - Javadoc ) * @ see org . jboss . arquillian . impl . configuration . api . ArquillianDescriptor # getContainers ( ) */ @ Override public List < ContainerDef > getContainers ( ) { } }
List < ContainerDef > containers = new ArrayList < ContainerDef > ( ) ; for ( Node container : model . get ( "container" ) ) { containers . add ( new ContainerDefImpl ( getDescriptorName ( ) , model , container ) ) ; } return containers ;
public class JAXBAnnotationsHelper { /** * Puts definitions for XML attribute . * @ param member annotations provider * @ param property property instance to be updated */ private static void applyAttribute ( Annotated member , Schema property ) { } }
final XmlAttribute attribute = member . getAnnotation ( XmlAttribute . class ) ; if ( attribute != null ) { final XML xml = getXml ( property ) ; xml . setAttribute ( true ) ; setName ( attribute . namespace ( ) , attribute . name ( ) , property ) ; }
public class CacheProviderWrapper { /** * This method is used only by default cache provider ( cache . java ) . Do nothing . */ @ Override public void addToTimeLimitDaemon ( Object id , long expirationTime , int inactivity ) { } }
final String methodName = "addToTimeLimitDaemon()" ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " ERROR because it should not be called" ) ; }
public class Stream { /** * Creates a new Stream over the elements of the supplied { @ code Iterable } . If the supplied * { @ code Iterable } is a { @ code Stream } , it will be returned unchanged . If the supplied * { @ code Iterable } implements { @ code Closeable } , method { @ link Closeable # close ( ) } will...
if ( iterable instanceof Stream ) { return ( Stream < T > ) iterable ; } else if ( iterable instanceof ImmutableCollection < ? > && ( ( ImmutableCollection < ? extends T > ) iterable ) . isEmpty ( ) ) { return new EmptyStream < T > ( ) ; } else { return new IterableStream < T > ( iterable ) ; }
public class ViewHelper { /** * Equivalent to calling View . setTag * @ param cacheView The cache of views to get the view from * @ param viewId The id of the view whose tag should change * @ param tag An Object to tag the view with */ public static void setTag ( EfficientCacheView cacheView , int viewId , Object...
View view = cacheView . findViewByIdEfficient ( viewId ) ; if ( view != null ) { view . setTag ( tag ) ; }
public class Style { /** * Convert a dash array to string . * @ param dash the dash to convert . * @ param shift the shift . * @ return the string representation . */ public static String dashToString ( float [ ] dash , Float shift ) { } }
StringBuilder sb = new StringBuilder ( ) ; if ( shift != null ) sb . append ( shift ) ; for ( int i = 0 ; i < dash . length ; i ++ ) { if ( shift != null || i > 0 ) { sb . append ( "," ) ; } sb . append ( ( int ) dash [ i ] ) ; } return sb . toString ( ) ;
public class PrimaryBackupServiceContext { /** * Sets the current timestamp . * @ param timestamp the updated timestamp * @ return the current timestamp */ public long setTimestamp ( long timestamp ) { } }
this . currentTimestamp = timestamp ; service . tick ( WallClockTimestamp . from ( timestamp ) ) ; return currentTimestamp ;
public class CommerceAccountOrganizationRelLocalServiceBaseImpl { /** * Returns a range of all the commerce account organization rels . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they ...
return commerceAccountOrganizationRelPersistence . findAll ( start , end ) ;
public class KiteConnect { /** * Gets account balance and cash margin details for a particular segment . * Example for segment can be equity or commodity . * @ param segment can be equity or commodity . * @ return Margins object . * @ throws KiteException is thrown for all Kite trade related errors . * @ thro...
String url = routes . get ( "user.margins.segment" ) . replace ( ":segment" , segment ) ; JSONObject response = new KiteRequestHandler ( proxy ) . getRequest ( url , apiKey , accessToken ) ; return gson . fromJson ( String . valueOf ( response . get ( "data" ) ) , Margin . class ) ;
public class Table { /** * / * Add a new Cell in the current row . * Adds to the table after this call and before next call to newRow , * newCell or newHeader are added to the cell . * @ return This table for call chaining */ public Table addCell ( Object o , String attributes ) { } }
addCell ( o ) ; cell . attribute ( attributes ) ; return this ;
public class QrCodeUtil { /** * 生成二维码或条形码图片 < br > * 只有二维码时QrConfig中的图片才有效 * @ param content 文本内容 * @ param format 格式 , 可选二维码 、 条形码等 * @ param config 二维码配置 , 包括长 、 宽 、 边距 、 颜色等 * @ return 二维码图片 ( 黑白 ) * @ since 4.1.14 */ public static BufferedImage generate ( String content , BarcodeFormat format , QrConfig...
final BitMatrix bitMatrix = encode ( content , format , config ) ; final BufferedImage image = toImage ( bitMatrix , config . foreColor , config . backColor ) ; final Image logoImg = config . img ; if ( null != logoImg && BarcodeFormat . QR_CODE == format ) { // 只有二维码可以贴图 final int qrWidth = image . getWidth ( ) ; fina...
public class CodedConstant { /** * Given a field type , return the wire type . * @ param type the type * @ param isPacked the is packed * @ return the wire format for field type * @ returns One of the { @ code WIRETYPE _ } constants defined in { @ link WireFormat } . */ static int getWireFormatForFieldType ( fi...
if ( isPacked ) { return WireFormat . WIRETYPE_LENGTH_DELIMITED ; } else { return type . getWireType ( ) ; }
public class ActionResponseReflector { protected String toJsonBySwitchedJsonEngine ( JsonManager jsonManager , Object jsonResult , Supplier < RealJsonEngine > jsonEngineSwitcher ) { } }
final RealJsonEngine switchedEngine = jsonEngineSwitcher . get ( ) ; // application ' s callback if ( switchedEngine == null ) { // check for user method throw new IllegalStateException ( "The jsonEngineSwitcher cannot return null: " + jsonEngineSwitcher ) ; } return switchedEngine . toJson ( jsonResult ) ;
public class MariaDbStatement { /** * Adds the given SQL command to the current list of commands for this < code > Statement < / code > * object . The send in this list can be executed as a batch by calling the method * < code > executeBatch < / code > . * @ param sql typically this is a SQL < code > INSERT < / c...
if ( batchQueries == null ) { batchQueries = new ArrayList < > ( ) ; } if ( sql == null ) { throw ExceptionMapper . getSqlException ( "null cannot be set to addBatch( String sql)" ) ; } batchQueries . add ( sql ) ;
public class IdentityPatchRunner { /** * Rollback a patch . * @ param patchID the patch id * @ param context the patch context * @ throws PatchingException */ private void rollback ( final String patchID , final IdentityPatchContext context ) throws PatchingException { } }
try { // Load the patch history final PatchingTaskContext . Mode mode = context . getMode ( ) ; final Patch originalPatch = loadPatchInformation ( patchID , installedImage ) ; final RollbackPatch rollbackPatch = loadRollbackInformation ( patchID , installedImage ) ; final Patch . PatchType patchType = rollbackPatch . g...
public class Bytes { /** * Creates a Bytes object by copying the data of the given ByteBuffer . * @ param bb Data will be read from this ByteBuffer in such a way that its position is not * changed . */ public static final Bytes of ( ByteBuffer bb ) { } }
Objects . requireNonNull ( bb ) ; if ( bb . remaining ( ) == 0 ) { return EMPTY ; } byte [ ] data ; if ( bb . hasArray ( ) ) { data = Arrays . copyOfRange ( bb . array ( ) , bb . position ( ) + bb . arrayOffset ( ) , bb . limit ( ) + bb . arrayOffset ( ) ) ; } else { data = new byte [ bb . remaining ( ) ] ; // duplicat...
public class TableInfo { /** * Adds the element collection metadata . * @ param elementCollectionMetadata * the element collection metadata */ public void addElementCollectionMetadata ( CollectionColumnInfo elementCollectionMetadata ) { } }
if ( this . elementCollectionMetadatas == null ) { this . elementCollectionMetadatas = new ArrayList < CollectionColumnInfo > ( ) ; } if ( ! elementCollectionMetadatas . contains ( elementCollectionMetadata ) ) { elementCollectionMetadatas . add ( elementCollectionMetadata ) ; }
public class ServerPluginRepository { /** * Move the plugins recently downloaded to extensions / plugins . */ private void moveDownloadedPlugins ( ) { } }
if ( fs . getDownloadedPluginsDir ( ) . exists ( ) ) { for ( File sourceFile : listJarFiles ( fs . getDownloadedPluginsDir ( ) ) ) { overrideAndRegisterPlugin ( sourceFile ) ; } }
public class TCPMasterConnection { /** * Tests if this < tt > TCPMasterConnection < / tt > is connected . * @ return < tt > true < / tt > if connected , < tt > false < / tt > otherwise . */ public synchronized boolean isConnected ( ) { } }
if ( connected && socket != null ) { if ( ! socket . isConnected ( ) || socket . isClosed ( ) || socket . isInputShutdown ( ) || socket . isOutputShutdown ( ) ) { try { socket . close ( ) ; } catch ( IOException e ) { logger . error ( "Socket exception" , e ) ; } finally { connected = false ; } } else { /* * When useUr...
public class ModelBuilder3D { /** * Translates the template ring system to new coordinates . * @ param originalCoord original coordinates of the placed ring atom from template * @ param newCoord new coordinates from branch placement * @ param ac AtomContainer contains atoms of ring system */ private void translat...
Point3d transVector = new Point3d ( originalCoord ) ; transVector . sub ( newCoord ) ; for ( int i = 0 ; i < ac . getAtomCount ( ) ; i ++ ) { if ( ! ( ac . getAtom ( i ) . getFlag ( CDKConstants . ISPLACED ) ) ) { ac . getAtom ( i ) . getPoint3d ( ) . sub ( transVector ) ; // ac . getAtomAt ( i ) . setFlag ( CDKConstan...
public class JsonStringToJsonIntermediateConverter { /** * Parses a provided JsonObject input using the provided JsonArray schema into * a JsonObject . * @ param record * @ param schema * @ return * @ throws DataConversionException */ private JsonObject parse ( JsonObject record , JsonSchema schema ) throws D...
JsonObject output = new JsonObject ( ) ; for ( int i = 0 ; i < schema . fieldsCount ( ) ; i ++ ) { JsonSchema schemaElement = schema . getFieldSchemaAt ( i ) ; String columnKey = schemaElement . getColumnName ( ) ; JsonElement parsed ; if ( ! record . has ( columnKey ) ) { output . add ( columnKey , JsonNull . INSTANCE...
public class ExtensionNamespacesManager { /** * Get the index for a namespace entry in the extension namespace Vector , - 1 if * no such entry yet exists . */ public int namespaceIndex ( String namespace , Vector extensions ) { } }
for ( int i = 0 ; i < extensions . size ( ) ; i ++ ) { if ( ( ( ExtensionNamespaceSupport ) extensions . get ( i ) ) . getNamespace ( ) . equals ( namespace ) ) return i ; } return - 1 ;
public class ConfigurationDialog { /** * / * Panel to choose underline Colors * @ since 4.2 */ JPanel getUnderlineColorPanel ( List < Rule > rules ) { } }
JPanel panel = new JPanel ( ) ; panel . setLayout ( new GridBagLayout ( ) ) ; GridBagConstraints cons = new GridBagConstraints ( ) ; cons . gridx = 0 ; cons . gridy = 0 ; cons . weightx = 0.0f ; cons . fill = GridBagConstraints . NONE ; cons . anchor = GridBagConstraints . NORTHWEST ; List < String > categories = new A...
public class MuxServer { /** * Grabs the channel for writing . * @ param channel the channel * @ return true if the channel has permission to write . */ OutputStream writeChannel ( int channel ) throws IOException { } }
while ( os != null ) { boolean canWrite = false ; synchronized ( WRITE_LOCK ) { if ( ! isWriteLocked ) { isWriteLocked = true ; canWrite = true ; } else { try { WRITE_LOCK . wait ( 5000 ) ; } catch ( Exception e ) { } } } if ( canWrite ) { os . write ( 'C' ) ; os . write ( channel >> 8 ) ; os . write ( channel ) ; retu...
public class Currency { /** * Registers a new currency for the provided locale . The returned object * is a key that can be used to unregister this currency object . * < p > Because ICU may choose to cache Currency objects internally , this must * be called at application startup , prior to any calls to * Curre...
return getShim ( ) . registerInstance ( currency , locale ) ;
public class AWSServiceCatalogClient { /** * Lists all provisioning artifacts ( also known as versions ) for the specified product . * @ param listProvisioningArtifactsRequest * @ return Result of the ListProvisioningArtifacts operation returned by the service . * @ throws ResourceNotFoundException * The specif...
request = beforeClientExecution ( request ) ; return executeListProvisioningArtifacts ( request ) ;
public class N { /** * Distinct by the value mapped from < code > keyMapper < / code > . * Mostly it ' s designed for one - step operation to complete the operation in one step . * < code > java . util . stream . Stream < / code > is preferred for multiple phases operation . * @ param a * @ param fromIndex * ...
checkFromToIndex ( fromIndex , toIndex , len ( a ) ) ; if ( N . isNullOrEmpty ( a ) ) { return new ArrayList < > ( ) ; } final List < T > result = new ArrayList < > ( ) ; final Set < Object > set = new HashSet < > ( ) ; for ( int i = fromIndex ; i < toIndex ; i ++ ) { if ( set . add ( hashKey ( keyMapper . apply ( a [ ...
public class ConfigProcessor { /** * Process user configuration of " version " . If set to GCLOUD _ CONFIG then allow gcloud to generate * a version . If set but not a keyword then just return the set value . */ String processVersion ( String version ) { } }
if ( version == null || version . trim ( ) . isEmpty ( ) || version . equals ( APPENGINE_CONFIG ) ) { throw new IllegalArgumentException ( VERSION_ERROR ) ; } else if ( version . equals ( GCLOUD_CONFIG ) ) { return null ; } return version ;
public class HttpHealthCheckService { /** * Creates a new response which is sent when the { @ link Server } is unhealthy . */ protected AggregatedHttpMessage newUnhealthyResponse ( @ SuppressWarnings ( "UnusedParameters" ) ServiceRequestContext ctx ) { } }
return AggregatedHttpMessage . of ( HttpStatus . SERVICE_UNAVAILABLE , MediaType . PLAIN_TEXT_UTF_8 , RES_NOT_OK ) ;
public class NewChunk { /** * Slow - path append data */ private void append2slowUUID ( ) { } }
if ( _id != null ) cancel_sparse ( ) ; if ( _ds == null && _ms != null ) { // This can happen for columns with all NAs and then a UUID _xs = null ; _ms . switchToLongs ( ) ; _ds = MemoryManager . malloc8d ( _sparseLen ) ; Arrays . fill ( _ms . _vals8 , C16Chunk . _LO_NA ) ; Arrays . fill ( _ds , Double . longBitsToDoub...
public class TypeDesc { /** * Acquire a TypeDesc from any class name , including primitives and arrays . * Primitive and array syntax matches Java declarations . */ public static TypeDesc forClass ( final String name ) throws IllegalArgumentException { } }
if ( name . length ( ) < 1 ) { throw invalidName ( name ) ; } // TODO : Support generics in name . TypeDesc type = cNamesToInstances . get ( name ) ; if ( type != null ) { return type ; } int index1 = name . lastIndexOf ( '[' ) ; int index2 = name . lastIndexOf ( ']' ) ; if ( index2 >= 0 ) { if ( index2 + 1 != name . l...
public class RCSwitch { /** * Send a set of bits * @ param bitSet Bits ( 000001010100010001) * @ param length Length of the bit string ( 24) */ public void send ( final BitSet bitSet , int length ) { } }
if ( transmitterPin != null ) { for ( int nRepeat = 0 ; nRepeat < repeatTransmit ; nRepeat ++ ) { for ( int i = 0 ; i < length ; i ++ ) { if ( bitSet . get ( i ) ) { transmit ( protocol . getOneBit ( ) ) ; } else { transmit ( protocol . getZeroBit ( ) ) ; } } sendSync ( ) ; } transmitterPin . low ( ) ; }
public class UIData { /** * < p > Override behavior from { @ link * UIComponentBase # invokeOnComponent } to provide special care for * positioning the data properly before finding the component and * invoking the callback on it . If the argument * < code > clientId < / code > is equal to < code > this . getCli...
if ( null == context || null == clientId || null == callback ) { throw new NullPointerException ( ) ; } String myId = super . getClientId ( context ) ; boolean found = false ; if ( clientId . equals ( myId ) ) { try { this . pushComponentToEL ( context , compositeParent ) ; callback . invokeContextCallback ( context , ...
public class DefaultQueryParamsParser { /** * < strong > Important : < / strong > Grouping itself is not specified by JSON API itself , but the * keyword and format it reserved for today and future use in Katharsis . * Group params can be send with following format : < br > * < strong > group [ ResourceType ] = "...
String groupingKey = RestrictedQueryParamsMembers . group . name ( ) ; Map < String , Set < String > > grouping = filterQueryParamsByKey ( context , groupingKey ) ; Map < String , Set < String > > temporaryGroupingMap = new LinkedHashMap < > ( ) ; for ( Map . Entry < String , Set < String > > entry : grouping . entrySe...
public class TheMovieDbApi { /** * Get the primary information about a TV series by id . * @ param tvID tvID * @ param language language * @ param appendToResponse appendToResponse * @ return * @ throws com . omertron . themoviedbapi . MovieDbException */ public TVInfo getTVInfo ( int tvID , String language ,...
return tmdbTv . getTVInfo ( tvID , language , appendToResponse ) ;
public class BitUtil { /** * Returns the number of set bits in an array of longs . */ public static long pop_array ( long [ ] arr , int wordOffset , int numWords ) { } }
long popCount = 0 ; for ( int i = wordOffset , end = wordOffset + numWords ; i < end ; ++ i ) { popCount += Long . bitCount ( arr [ i ] ) ; } return popCount ;
public class ObjectManager { /** * @ returns long the current Log filesize in bytes . * @ throws ObjectManagerException */ public long getLogFileSize ( ) throws ObjectManagerException { } }
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getLogFileSize" ) ; long logFileSize = objectManagerState . logOutput . getLogFileSize ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "getLogFileSize" , ne...
public class CmsSolrIndex { /** * Checks if the query should be executed using the debug mode where the security restrictions do not apply . * @ param cms the current context . * @ param query the query to execute . * @ return a flag , indicating , if the query should be performed in debug mode . */ private boole...
String [ ] debugSecretValues = query . remove ( REQUEST_PARAM_DEBUG_SECRET ) ; String debugSecret = ( debugSecretValues == null ) || ( debugSecretValues . length < 1 ) ? null : debugSecretValues [ 0 ] ; if ( ( null != debugSecret ) && ! debugSecret . trim ( ) . isEmpty ( ) && ( null != m_handlerDebugSecretFile ) ) { tr...
public class RelationalOperations { /** * Returns true if pt _ a touches env _ b . */ private static boolean pointTouchesEnvelope_ ( Point2D pt_a , Envelope2D env_b , double tolerance , ProgressTracker progress_tracker ) { } }
if ( env_b . getHeight ( ) <= tolerance && env_b . getWidth ( ) <= tolerance ) return false ; // when treates as a point , points cannot touch points Envelope2D env_b_inflated = new Envelope2D ( ) , env_b_deflated = new Envelope2D ( ) ; env_b_inflated . setCoords ( env_b ) ; env_b_inflated . inflate ( tolerance , toler...
public class JacksonSingleton { /** * Gets the JSONP response for the given callback and value . * @ param callback the callback name * @ param data the data to transform to json * @ return the String built as follows : " callback ( json ( data ) ) " */ public String toJsonP ( final String callback , final Object...
synchronized ( lock ) { try { return callback + "(" + stringify ( ( JsonNode ) mapper . valueToTree ( data ) ) + ");" ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
public class CloudantService { /** * { @ inheritDoc } */ @ Override public Object createResource ( ResourceInfo info ) throws Exception { } }
if ( info == null ) throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "direct.lookup.CWWKD0301E" , cloudantConfigIdentifier ) ) ; return createResource ( null , false , info . getAuth ( ) , info . getLoginPropertyList ( ) ) ;
public class LinearEquationSystem { /** * Method for total pivot search , searches for x , y in { k , . . . n } , so that * { @ code | a _ xy | > | a _ ij | } * @ param k search starts at entry ( k , k ) * @ return the position of the found pivot element */ private IntIntPair totalPivotSearch ( int k ) { } }
double max = 0 ; int i , j , pivotRow = k , pivotCol = k ; double absValue ; for ( i = k ; i < coeff . length ; i ++ ) { for ( j = k ; j < coeff [ 0 ] . length ; j ++ ) { // compute absolute value of // current entry in absValue absValue = Math . abs ( coeff [ row [ i ] ] [ col [ j ] ] ) ; // compare absValue with valu...
public class MetadataManager { /** * Read ClassDescriptors from the given InputStream . * @ see # mergeDescriptorRepository */ public DescriptorRepository readDescriptorRepository ( InputStream inst ) { } }
try { RepositoryPersistor persistor = new RepositoryPersistor ( ) ; return persistor . readDescriptorRepository ( inst ) ; } catch ( Exception e ) { throw new MetadataException ( "Can not read repository " + inst , e ) ; }
public class AbstractResourceAdapterDeployer { /** * Create a recovery module * @ param mcf The ManagedConnectionFactory * @ param cd The connection definition * @ return The recovery module , or < code > null < / code > if no recovery * @ exception Throwable In case on an error */ private org . ironjacamar . c...
Boolean padXid = Defaults . PAD_XID ; Boolean isSameRMOverride = Defaults . IS_SAME_RM_OVERRIDE ; Boolean wrapXAResource = Defaults . WRAP_XA_RESOURCE ; String securityDomain = null ; RecoveryPlugin plugin = null ; Collection < org . ironjacamar . core . api . deploymentrepository . ConfigProperty > dcps = null ; if ( ...
public class InputParallelismMarshaller { /** * Marshall the given parameter object . */ public void marshall ( InputParallelism inputParallelism , ProtocolMarshaller protocolMarshaller ) { } }
if ( inputParallelism == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( inputParallelism . getCount ( ) , COUNT_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( )...
public class MavenImportUtils { /** * Force the pom file of a project to be " simple " . * @ param projectDir the folder in which the pom file is located . * @ param monitor the progress monitor . * @ throws IOException if the pom file cannot be changed . */ static void forceSimplePom ( File projectDir , IProgres...
final File pomFile = new File ( projectDir , POM_FILE ) ; if ( pomFile . exists ( ) ) { final SubMonitor submon = SubMonitor . convert ( monitor , 4 ) ; final File savedPomFile = new File ( projectDir , POM_BACKUP_FILE ) ; if ( savedPomFile . exists ( ) ) { savedPomFile . delete ( ) ; } submon . worked ( 1 ) ; Files . ...
public class RemoteTaskRunner { /** * Schedule a task that will , at some point in the future , clean up znodes and issue failures for " tasksToFail " * if they are being run by " worker " . */ private void scheduleTasksCleanupForWorker ( final String worker , final List < String > tasksToFail ) { } }
// This method is only called from the PathChildrenCache event handler , so this may look like a race , // but is actually not . cancelWorkerCleanup ( worker ) ; final ListenableScheduledFuture < ? > cleanupTask = cleanupExec . schedule ( new Runnable ( ) { @ Override public void run ( ) { log . info ( "Running schedul...
public class IfcLightDistributionDataImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < Double > getSecondaryPlaneAngle ( ) { } }
return ( EList < Double > ) eGet ( Ifc4Package . Literals . IFC_LIGHT_DISTRIBUTION_DATA__SECONDARY_PLANE_ANGLE , true ) ;
public class MoreCollectors { /** * Returns a { @ code Collector } which performs the bitwise - and operation of a * long - valued function applied to the input elements . If no elements are * present , the result is empty { @ link OptionalLong } . * This method returns a * < a href = " package - summary . html...
return new CancellableCollectorImpl < > ( PrimitiveBox :: new , ( acc , t ) -> { if ( ! acc . b ) { acc . l = mapper . applyAsLong ( t ) ; acc . b = true ; } else { acc . l &= mapper . applyAsLong ( t ) ; } } , ( acc1 , acc2 ) -> { if ( ! acc1 . b ) return acc2 ; if ( ! acc2 . b ) return acc1 ; acc1 . l &= acc2 . l ; r...
public class SVGLogoPaneController { /** * Method sets the text displayed next to the logo . * @ param text */ public void setText ( final String text ) { } }
this . text . setText ( text ) ; this . text . setFont ( Font . font ( this . text . getFont ( ) . getFamily ( ) , FontWeight . BOLD , size / 2 ) ) ; stack . requestLayout ( ) ;
public class HttpServiceSchedulerClient { /** * Construct the endpoint to send http request for a particular command * Make sure the construction matches server sides . * @ param schedulerEndpoint The scheduler http endpoint * @ param command The command to request * @ return The http endpoint for particular co...
// Currently the server side receives command request in lower case return String . format ( "http://%s/%s" , schedulerEndpoint , command . name ( ) . toLowerCase ( ) ) ;
public class GVRCamera { /** * Add a post - effect to this camera ' s render chain . * Post - effects are GL shaders , applied to the texture ( hardware bitmap ) * containing the rendered scene graph . Each post - effect combines a shader * selector with a set of parameters : This lets you pass different * para...
GVRContext ctx = getGVRContext ( ) ; if ( mPostEffects == null ) { mPostEffects = new GVRRenderData ( ctx , postEffectData ) ; GVRMesh dummyMesh = new GVRMesh ( getGVRContext ( ) , "float3 a_position float2 a_texcoord" ) ; mPostEffects . setMesh ( dummyMesh ) ; NativeCamera . setPostEffect ( getNative ( ) , mPostEffect...