code
stringlengths
10
174k
nl
stringlengths
3
129k
public RandomBallCoverOneShot(List<V> vecs,DistanceMetric dm,ExecutorService execServ){ this(vecs,dm,(int)Math.sqrt(vecs.size()),execServ); }
Creates a new one-shot version of the Random Cover Ball.
public static Builder createBuilder(Header header,WritableFontData data){ return new Builder(header,data); }
Creates a new builder using the header information and data provided.
public JCExpression Create(Symbol ctor,List<JCExpression> args){ Type t=ctor.owner.erasure(types); JCNewClass newclass=NewClass(null,null,Type(t),args,null); newclass.constructor=ctor; newclass.setType(t); return newclass; }
Create a method invocation from a method tree and a list of argument trees.
protected void writeChunk(byte buffer[],int offset,int length) throws IOException { this.out.write(buffer,offset,length); }
Provides an extension point for ExtraDotOutputStream to be able to add dots at the beginning of new lines.
public static String logoBasePath(){ final HttpServletRequest request=ServletActionContext.getRequest(); final String url=WebUtils.extractRequestDomainURL(request,false); final String imagePath=url.concat(ReportConstants.IMAGE_CONTEXT_PATH).concat((String)request.getSession().getAttribute("citylogo")); return i...
Gives the absolute path of the logo image
public boolean containsTarget(Object target,int tweenType){ for (int i=0, n=objects.size(); i < n; i++) { BaseTween<?> obj=objects.get(i); if (obj.containsTarget(target,tweenType)) return true; } return false; }
Returns true if the manager contains any valid interpolation associated to the given target object and to the given tween type.
protected int scanEntity(final char[] a,final int offset,final int length,final boolean loose,final MutableString entity){ int i, c=0; String tmpEntity; if (length < 2) return -1; if (a[offset + 1] == '#') { if (length > 2 && a[offset + 2] == 'x') { for (i=3; i < length && i < MAX_HEX_ENTITY_LENGTH ...
Searches for the end of an entity. <P>This method will search for the end of an entity starting at the given offset (the offset must correspond to the ampersand). <P>Real-world HTML pages often contain hundreds of misplaced ampersands, due to the unfortunate idea of using the ampersand as query separator (<em>please</e...
public DateStart(Date startDate){ super(startDate); }
Creates a start date property.
void initialize(){ jLabel5=new JLabel(); GridBagConstraints gridBagConstraints28=new GridBagConstraints(); GridBagConstraints gridBagConstraints37=new GridBagConstraints(); jLabel10=new JLabel(); GridBagConstraints gridBagConstraints45=new GridBagConstraints(); jLabel6=new JLabel(); jLabel3=new JLabel(); ...
This method initializes this
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:21.694 -0500",hash_original_method="6C3907764C0BC2109F0045771A33B621",hash_generated_method="FC81C9DD59488DDB92951F61D633C0C4") public final CharSequence coerceToString(){ int t=type; if (t == TYPE_STRING) { return string; ...
Regardless of the actual type of the value, try to convert it to a string value. For example, a color type will be converted to a string of the form #aarrggbb.
public AttributeList(AttributeList list){ super(list); }
Constructs an <CODE>AttributeList</CODE> containing the elements of the <CODE>AttributeList</CODE> specified, in the order in which they are returned by the <CODE>AttributeList</CODE>'s iterator. The <CODE>AttributeList</CODE> instance has an initial capacity of 110% of the size of the <CODE>AttributeList</CODE> speci...
public String useAverageTipText(){ return "If true, average estimates are used instead of one estimate from pooled predictions."; }
Returns the tip text for this property
public BufferCapabilities(ImageCapabilities frontCaps,ImageCapabilities backCaps,FlipContents flipContents){ if (frontCaps == null || backCaps == null) { throw new IllegalArgumentException("Image capabilities specified cannot be null"); } this.frontCaps=frontCaps; this.backCaps=backCaps; this.flipContents...
Creates a new object for specifying buffering capabilities
protected ShaderVar addGlobal(IGlobalShaderVar var){ return addGlobal(var.getVarString(),var.getDataType()); }
Adds a global variable
protected ArrayDBIDs affectedRkNN(List<? extends Collection<DoubleDBIDPair>> extract,DBIDs remove){ HashSetModifiableDBIDs ids=DBIDUtil.newHashSet(); for ( Collection<DoubleDBIDPair> drps : extract) { for ( DoubleDBIDPair drp : drps) { ids.add(drp); } } ids.removeDBIDs(remove); return DBIDUt...
Extracts and removes the DBIDs in the given collections.
private FrequencyDistribution<String> createFreqDistForMiscFile(File misc) throws IOException { BufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(misc),outputEncoding)); FrequencyDistribution<String> letterFD=new FrequencyDistribution<String>(); String readLine=null; while ((rea...
Creates a new frequency distribution over the starting letters in the misc file as preparation for splitting
public static boolean isNonPublicProxyClass(Class<?> cls){ String name=cls.getName(); int i=name.lastIndexOf('.'); String pkg=(i != -1) ? name.substring(0,i) : ""; return Proxy.isProxyClass(cls) && !pkg.equals(PROXY_PACKAGE); }
Test if the given class is a proxy class that implements non-public interface. Such proxy class may be in a non-restricted package that bypasses checkPackageAccess.
public BigInteger findDeviceState(){ return new BigInteger("2"); }
Retrieve the Device State
public String numCyclesTipText(){ return "The number of cycles to use (in combination with the 'Sine' pattern)."; }
Returns the tip text for this property
public MultiStatus(String pluginId,int code,String message,Throwable exception){ super(OK,pluginId,code,message,exception); children=new IStatus[0]; }
Creates and returns a new multi-status object with no children.
public CustomToken(int start,int end,IElementType type){ tokenStart=start; tokenEnd=end; tokenType=type; }
Creates parsed token entry
public Object clone(){ try { return super.clone(); } catch ( java.lang.CloneNotSupportedException e) { throw new RuntimeException(e.toString()); } }
Returns a copy of this XMLOutputter.
void advanceTo(DateValue newStartUtc){ it.advanceTo(newStartUtc); }
Advances the underlying iterator to the given date value.
public boolean isEmpty(){ return fMap.isEmpty(); }
Returns <code>true</code> if the set of changed partitionings is empty, <code>false</code> otherwise.
public boolean isActive(){ return active; }
"active" means that the object is still displayed, and should be stored.
public RequestCreator resize(int targetWidth,int targetHeight){ data.resize(targetWidth,targetHeight); return this; }
Resize the image to the specified size in pixels.
public void testInit(){ }
Called when the Robot has entered Test mode. This should be overridden.
public static <T>ResponseOrError<T> fromData(@Nonnull T data){ return new ResponseOrError<>(checkNotNull(data),null); }
Returns data response from data
@SuppressWarnings("unchecked") public static <E>String serialize(E object) throws IOException { return mapperFor((Class<E>)object.getClass()).serialize(object); }
Serialize an object to a JSON String.
public void addDocument(String referenceURI,Transforms trans) throws XMLSignatureException { this.signedInfo.addDocument(this.baseURI,referenceURI,trans,Constants.ALGO_ID_DIGEST_SHA1,null,null); }
Adds a Reference with just the URI and the transforms. This used the SHA1 algorithm as a default digest algorithm.
public ResolutionSyntax(int crossFeedResolution,int feedResolution,int units){ if (crossFeedResolution < 1) { throw new IllegalArgumentException("crossFeedResolution is < 1"); } if (feedResolution < 1) { throw new IllegalArgumentException("feedResolution is < 1"); } if (units < 1) { throw new Ille...
Construct a new resolution attribute from the given items.
@Override public void onDestroy(){ super.onDestroy(); Log.d(LOG_TAG,"Removing location listeners"); stopListeners(); Toast.makeText(this,"Tracking service stopped",Toast.LENGTH_SHORT); }
Shuts down this service
@Override protected void prepareView(){ ExtendedMapAgentView mEnv=(ExtendedMapAgentView)frame.getEnvView(); mEnv.setData(scenario,destinations,null); mEnv.setEnvironment(scenario.getEnv()); }
Prepares the view for the previously specified scenario and destinations.
public ManifestParser(){ parser=new JSONParser(); findHome(); }
Prepare JSONParser and find out the home folder. Call parse() afterwards.
@Override public String initialize(){ String result; result=super.initialize(); if (result == null) { m_Statistics.clear(); if (m_File.exists()) { log("File '" + m_File + "' exists, loading..."); m_Statistics.addAll(read()); } } return result; }
Initializes the handler.
private void updateSeekBarsForSpringConfig(SpringConfig springConfig){ float tension=(float)OrigamiValueConverter.origamiValueFromTension(springConfig.tension); float tensionRange=MAX_TENSION - MIN_TENSION; int scaledTension=Math.round(((tension - MIN_TENSION) * MAX_SEEKBAR_VAL) / tensionRange); float friction=...
update the position of the seekbars based on the spring value;
public Bag removeObjectsAtLocation(final Object location){ Bag objs=(Bag)objectHash.remove(location); if (objs != null) for (int j=0; j < objs.numObjs; j++) { LocationAndIndex lai=(LocationAndIndex)(locationAndIndexHash.remove(objs.objs[j])); assert sim.util.LocationLog.it(this,lai.location); allObjec...
Removes objects at the given location, and returns a bag of them, or null of no objects are at that location. The Bag may be empty, or null, if there were no objects at that location. You can freely modify this bag.
public List<RawProperty> removeExtendedProperty(String name){ List<RawProperty> all=getExtendedProperties(); List<RawProperty> toRemove=new ArrayList<RawProperty>(); for ( RawProperty property : all) { if (property.getPropertyName().equalsIgnoreCase(name)) { toRemove.add(property); } } all.remo...
Removes all extended properties that have the given name.
public void deleteInstanceAt(int rowIndex){ deleteInstanceAt(rowIndex,true); }
deletes the instance at the given index
public DeltaInputStream(InputStream in,int distance){ if (in == null) throw new NullPointerException(); this.in=in; this.delta=new DeltaDecoder(distance); }
Creates a new Delta decoder with the given delta calculation distance.
public static GdbDelete parse(GdbOutput gdbOutput) throws GdbParseException { String output=gdbOutput.getOutput(); Matcher matcher=GDB_DELETE.matcher(output); if (matcher.find()) { return new GdbDelete(); } throw new GdbParseException(GdbDelete.class,output); }
Factory method.
static public void removeNotificationListener(JMXConnector jmxConnector,Class<?> mbeanInterface,String mbeanName,NotificationListener notificationListener,boolean ignored) throws Exception { MBeanServerConnection mbsc=jmxConnector.getMBeanServerConnection(); ObjectName objectName=generateMBeanObjectName(mbeanInterf...
Remove NotificationListener from this MBean.
public boolean appliesOnlyToBlockScopedElements(){ return false; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public void damageRange(JTextComponent a,int b,int c,Position.Bias d,Position.Bias e){ for (int i=0; i < uis.size(); i++) { ((TextUI)(uis.elementAt(i))).damageRange(a,b,c,d,e); } }
Invokes the <code>damageRange</code> method on each UI handled by this object.
public static void rgb2hsv(int r,int g,int b,int hsv[]){ int min=Math.min(Math.min(r,g),b); int max=Math.max(Math.max(r,g),b); double delta=(double)max - min; double H=0d, S=0d; double V=max / 255d; if (delta != 0) { S=(delta / max); if (r == max) { if (g >= b) { H=((g - b) / delta) * ...
Adapted from ImageJ documentation: http://www.f4.fhtw-berlin.de/~barthel/ImageJ/ColorInspector//HTMLHelp/farbraumJava.htm
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:53.791 -0400",hash_original_method="CC6A2D61A01777F134B61F210B4582B4",hash_generated_method="DC4F53437482264D89559E059DC0E69A") @Override public String toString(){ return getClass().getSimpleName(); }
Provide a String representaion of this file filter.
public ToolsToolBar(){ ResourceBundleUtil labels=ResourceBundleUtil.getBundle("org.jhotdraw.samples.svg.Labels"); setName(labels.getString("tools.toolbar")); }
Creates new instance.
public ConnectionConfig(){ super(); }
Ctor for a functional Swing object with no prexisting adapter
public void warn(SourceLocator srcLctr,Node styleNode,Node sourceNode,String msg) throws TransformerException { warn(srcLctr,styleNode,sourceNode,msg,null); }
Warn the user of a problem.
public synchronized Map<String,Long> avgMessagesSendTimes(){ return new HashMap<>(avgMsgsSndTimes); }
Gets average messages send time (grouped by type).
public void close(){ closeWriter(); closed=true; }
Close the writers, and the files if required. It is still possible to write after closing, however after each write the file is closed again (slowing down tracing).
public void unsetTaskName(){ this.taskName=null; }
Description: <br>
public BeanContextServicesSupport(BeanContextServices peer,Locale locale){ super(peer,locale); }
Constructs a <code>BeanContextServicesSupport</code> which is a delegate of the given peer.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:32:18.204 -0500",hash_original_method="854663FFCE0B2EEEA12F571F4E080752",hash_generated_method="12CB9C16CBE240104F270BEBAAE219EE") public void addFooterView(View v,Object data,boolean isSelectable){ FixedView...
Add a fixed view to appear at the bottom of the list. If addFooterView is called more than once, the views will appear in the order they were added. Views added using this call can take focus if they want. <p> NOTE: Call this before calling setAdapter. This is so ListView can wrap the supplied cursor with one that will...
public FilteredAttributes(IntSet indexSet,Attributes attributes){ this.indexSet=indexSet; this.attributes=attributes; }
Creates a filtered attributes instance.
@Override public void onClick(View v){ long id=(Long)v.getTag(TAG_ID_CALENDAR_ID); boolean newState; boolean initialState=mCalendarInitialStates.get(id); if (mCalendarChanges.containsKey(id)) { newState=!mCalendarChanges.get(id); } else { newState=!initialState; } if (newState == initialState) { ...
Method for changing the sync state when a calendar's button is pressed. This gets called when the CheckBox for a calendar is clicked. It toggles the sync state for the associated calendar and saves a change of state to a hashmap. It also compares against the original value and removes any changes from the hashmap if th...
public static BezierPath fitBezierPath(Point2D.Double[] digitizedPoints,double error){ return fitBezierPath(Arrays.asList(digitizedPoints),error); }
Fits a bezier path to the specified list of digitized points. <p> This is a convenience method for calling fitCubicSegments(List<Point2D.Double>, double);
public CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(){ }
Creates a new, uninitialized CUDA_POINTER_ATTRIBUTE_P2P_TOKENS
protected SVGOMAltGlyphItemElement(){ }
Creates a new SVGOMAltGlyphItemElement object.
public Object runSafely(Catbert.FastStack stack) throws Exception { switch (Ministry.getInstance().getJobStatusCode(getInt(stack))) { case TranscodeJob.COMPLETED: return "COMPLETED"; case TranscodeJob.TRANSCODING_SEGMENT_COMPLETE: case TranscodeJob.TRANSCODING: case TranscodeJob.LIMBO: return "TRANSCODING"; case ...
Gets the status of the specified transcoding job
@SuppressWarnings("unchecked") public static <T>int binarySearch(List<? extends T> list,T object,Comparator<? super T> comparator){ if (comparator == null) { return Collections.binarySearch((List<? extends Comparable<? super T>>)list,object); } if (!(list instanceof RandomAccess)) { ListIterator<? extends...
Performs a binary search for the specified element in the specified sorted list using the specified comparator. The list needs to be already sorted according to the comparator passed. Searching in an unsorted array has an undefined result. It's also undefined which element is found if there are multiple occurrences of ...
void sendMessage(byte[] message,TransportAddress address) throws IOException { DatagramPacket datagramPacket=new DatagramPacket(message,0,message.length,address); sock.send(datagramPacket); }
Sends message through this access point's socket.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:35:15.053 -0500",hash_original_method="3C6E7329283D3C6C46FB3F90EF65A4A7",hash_generated_method="DF69A7831BD134C7DE03F61A47C2BF23") final public boolean isInLayout(){ return mInLayout; }
Return true if the layout is included as part of an activity view hierarchy via the &lt;fragment&gt; tag. This will always be true when fragments are created through the &lt;fragment&gt; tag, <em>except</em> in the case where an old fragment is restored from a previous state and it does not appear in the layout of the...
protected Object resolveWrapper(VariableWrapper variableWrapper,Locale locale,TimeZone tz){ return variableWrapper.resolve(); }
NOTE: declared as a method to allow for extensibility
private void extractExpectedHighlightsSet(final Document document){ final String text=document.getText(); final Set<String> markers=highlightingTypes.keySet(); final String typesRx="(?:" + StringUtil.join(markers,")|(?:") + ")"; final String openingTagRx="<(" + typesRx + ")"+ "(?:\\s+descr=\"((?:[^\"]|\\\\\"|\\...
remove highlights (bounded with <marker>...</marker>) from test case file
public static synchronized EventManager init(Application application,PennStationOptions options){ if (sManager == null) { sManager=new EventManager(application,options); } return sManager; }
You can call this inside Application.onCreate(); This only needs to called once, call getManager() after.
static Object[] promotePrimitives(Object lhs,Object rhs){ lhs=promoteToInteger(lhs); rhs=promoteToInteger(rhs); if ((lhs instanceof Number) && (rhs instanceof Number)) { Number lnum=(Number)lhs; Number rnum=(Number)rhs; boolean b; if ((b=(lnum instanceof Double)) || (rnum instanceof Double)) { ...
Promote the pair of primitives to the maximum type of the two. e.g. [int,long]->[long,long]
protected void describeGraph(final Resource graph,final IVCount[] predicatePartitionCounts,final IVCount[] classPartitionCounts){ g.add(graph,RDF.TYPE,SD.Graph); g.add(graph,VoidVocabularyDecl.triples,f.createLiteral(tripleStore.getStatementCount())); g.add(graph,VoidVocabularyDecl.entities,f.createLiteral(triple...
Describe a named or default graph.
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeShape(this.legendLine,stream); SerialUtilities.writeComposite(this.fillComposite,stream); }
Provides serialization support.
public static int paintSyntaxLine(Segment line,Token tokens,SyntaxStyle[] styles,TabExpander expander,Graphics gfx,int x,int y){ Font defaultFont=gfx.getFont(); Color defaultColor=gfx.getColor(); int offset=0; for (; ; ) { byte id=tokens.id; if (id == Token.END) break; int length=tokens.length; ...
Paints the specified line onto the graphics context. Note that this method munges the offset and count values of the segment.
public static boolean parseBoolean(String input){ if (null == input) { return false; } else if (input.equalsIgnoreCase("true")) { return true; } return false; }
Determine the <code>boolean</code> value of the given <code>String</code>. Treat all <code>null</code> values as <code>false</code>. The default is <code>false</code>. This ensures the <code>String</code> will always be parsed against the English "true"
public PdxSerializationException(String message){ super(message); }
Create the exception with the given message.
public static void createAllTables(SQLiteDatabase db,boolean ifNotExists){ WIFILockManagerDao.createTable(db,ifNotExists); }
Creates underlying database table using DAOs.
private void displayInternalServerError(){ alertDialog=CommonDialogUtils.getAlertDialogWithOneButtonAndTitle(context,getResources().getString(R.string.title_head_connection_error),getResources().getString(R.string.error_internal_server),getResources().getString(R.string.button_ok),null); alertDialog.show(); }
Displays an internal server error message to the user.
public final static byte[] readSecurityBufferTarget(byte[] msg,int securityBufferOffset){ byte[] securityBuffer=new byte[8]; System.arraycopy(msg,securityBufferOffset,securityBuffer,0,8); ByteUtilities.changeWordEndianess(securityBuffer,0,8); int length=ByteUtilities.makeIntFromByte2(securityBuffer); int offs...
Reads the byte array described by the security buffer stored at the <code>securityBufferOffset</code> offset.
public static String join(Iterable<?> iterable,String separator){ final StringBuilder sb=new StringBuilder(); boolean first=true; for ( Object item : iterable) { if (first) { first=false; } else { sb.append(separator); } sb.append(item.toString()); } return sb.toString(); }
Creates a String of all elements of an iterable, separated by a separator.
protected void logWrapper(String message){ }
Wraps a possible log message to be overridden for testability purposes.
static TestRunStatus runTests(TestEnvironment testEnvironment,String packageName,String basename) throws IOException { String testClasspath=testEnvironment.testClassPath; Path jacocoDir=testEnvironment.jacocoDir; String execFile=jacocoDir.resolve(basename + "jacoco.exec").toString(); String jUnitTestSuiteName="...
Runs the tests with the given basename, and captures and returns a description of the results.
public static <T>T splitEachLine(InputStream stream,String regex,String charset,@ClosureParams(value=FromString.class,options={"List<String>","String[]"},conflictResolutionStrategy=PickFirstResolver.class) Closure<T> closure) throws IOException { return splitEachLine(new BufferedReader(new InputStreamReader(stream,ch...
Iterates through the given InputStream line by line using the specified encoding, splitting each line using the given separator. The list of tokens for each line is then passed to the given closure. Finally, the stream is closed.
public static Pattern compile(String regex){ return new Pattern(regex,0); }
Compiles the given regular expression into a pattern
public void sendReInvite(SipRequest request,int serviceContext) throws PayloadException, NetworkException { if (sLogger.isActivated()) { sLogger.debug("sendReInvite()"); } SipTransactionContext ctx=mSession.getImsService().getImsModule().getSipManager().sendSipMessageAndWait(request,mSession.getResponseTimeou...
Send ReInvite
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:36:13.917 -0500",hash_original_method="D4D6A5236E4F49764789FE2E4242FD0D",hash_generated_method="6FE3E50244FC16A4647325ADA5662A76") @Deprecated public SslError(int error,X509Certificate certificate){ this(error,certificate,""); }
Creates a new SslError object using the supplied error and certificate. The URL will be set to the empty string.
public void test_initWithAlgorithmParameterSpec() throws Exception { AlgorithmParameterSpec ap=new IvParameterSpec(IV); Cipher cipher=Cipher.getInstance(ALGORITHM_3DES + "/CBC/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE,CIPHER_KEY_3DES,ap); byte[] cipherIV=cipher.getIV(); assertTrue("IVs differ",Arrays.eq...
javax.crypto.Cipher#init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec)
private boolean checkInvocationBound(int invocationCount,Stack<MethodCall> callStack){ if (invocationCount % (UPPER_PAIR_SEARCH_INVOCATION_BOUND / 10) == 0) { int percent=invocationCount / (UPPER_PAIR_SEARCH_INVOCATION_BOUND / 10); System.out.print(percent + "0% .. "); } if (invocationCount >= UPPER_PAIR_...
Returns true iff the given invocationCount has exceeded the upper limit defined by UPPER_PAIR_SEARCH_INVOCATION_BOUND
public void start(final String dbName){ HsqlProperties props=new HsqlProperties(); props.setProperty("server.database.0","target/" + dbName); props.setProperty("server.dbname.0",dbName); doStart(props); }
start the server with a database configuration.
public static void assertSame(String message,Object expected,Object actual){ Assert.assertSame(message,expected,actual); }
Asserts that two objects refer to the same object. If they are not an AssertionFailedError is thrown with the given message.
public double[][] generateBivariateNormalData(int length,double mean1,double std1,double mean2,double std2,double covariance){ double[][] data=new double[length][2]; double sigma21=covariance / std1; double sigma22=Math.sqrt(std2 * std2 - sigma21 * sigma21); for (int i=0; i < length; i++) { double x1=random...
<p>Generate bivariate Gaussian series with the given covariance. See http://mathworld.wolfram.com/BivariateNormalDistribution.html</p> <p> If we have two normal distributions x1 and x2, we can define</br> <ul> <li>y1 = mean1 + sigma11*x1 + sigma12*x2</li> <li>y2 = mean2 + sigma21*x1 + sigma22*x2</li> </ul> which are Ga...
public void drag(long time,float x,float y,float deltaX,float deltaY,float totalX,float totalY){ mModelSelectorButton.drag(x,y); getActiveStripLayoutHelper().drag(time,x,y,deltaX,deltaY,totalX,totalY); }
Called on touch drag event.
public Collection addCollection(String collectionUri,String title,String... acceptedTypes){ Collection collection=new Collection(collectionUri,TextContent.plainText(title),acceptedTypes); addCollection(collection); return collection; }
Add a new collection with the given title and accept types.
public void testBoundedLongs(){ AtomicInteger fails=new AtomicInteger(0); Random r=new Random(); long size=123L; for (long least=-86028121; least < MAX_LONG_BOUND; least+=1982451653L) { for (long bound=least + 2; bound > least && bound < MAX_LONG_BOUND; bound+=Math.abs(bound * 7919)) { final long lo=l...
Each of a sequential sized stream of bounded longs is within bounds
int parseIntOption(String key,String value) throws URISyntaxException { try { return Integer.parseInt(value); } catch ( NumberFormatException nfe) { throw new URISyntaxException(value,"Invalid " + key + " value: "+ value); } }
Internal utility method to throw a syntax error if a value can not be parsed.
private void writeSkeletonDispatchCase(IndentingWriter p,int opnum) throws IOException { RemoteClass.Method method=remoteMethods[opnum]; MethodDoc methodDoc=method.methodDoc(); String methodName=methodDoc.name(); Type paramTypes[]=method.parameterTypes(); String paramNames[]=nameParameters(paramTypes); Type...
Writes the case block for the skeleton's dispatch method for the remote method with the given "opnum".
public void readEncryptionObject(final PdfObject encyptionObj,final PdfFileReader pdfFileReader) throws PdfSecurityException { stringsEncoded=false; isMetaDataEncypted=true; StmFObj=null; StrFObj=null; isAES=false; if (!isInitialised) { isInitialised=true; SetSecurity.init(); } if (SetSecurity.u...
extract metadata for encryption object
public static boolean withinInterface(Tree.Declaration decl){ return container(decl) instanceof com.redhat.ceylon.model.typechecker.model.Interface; }
Determines whether the declaration's containing scope is an interface
@Override public IndicesOptions indicesOptions(){ return indicesOptions; }
Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.
public void beginTransaction(HGTransactionConfig config){ getContext().beginTransaction(config); }
<p> Begin a new transaction in the current transaction context. If there's no transaction context bound to the active thread, one will be created. </p>
public T caseDefaultClause(DefaultClause object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Default Clause</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public void fling(int startX,int startY,int velocityX,int velocityY,int minX,int maxX,int minY,int maxY,int overX,int overY){ if (mFlywheel && !isFinished()) { float oldVelocityX=mScrollerX.mCurrVelocity; float oldVelocityY=mScrollerY.mCurrVelocity; if (Math.signum(velocityX) == Math.signum(oldVelocityX) ...
Start scrolling based on a fling gesture. The distance traveled will depend on the initial velocity of the fling.
public MBrowseField(Properties ctx,int AD_SmartBrowseField_ID){ this(ctx,AD_SmartBrowseField_ID,null); }
Browse Field
protected POInfo initPO(Properties ctx){ POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName()); return poi; }
Load Meta Data