code
stringlengths
10
174k
nl
stringlengths
3
129k
private static boolean hasSpecializedHandlerIntents(Context context,Intent intent){ try { PackageManager pm=context.getPackageManager(); List<ResolveInfo> handlers=pm.queryIntentActivities(intent,PackageManager.GET_RESOLVED_FILTER); if (handlers == null || handlers.size() == 0) { return false; }...
Used to check whether there is a specialized handler for a given intent.
private Node searchWord(NodeArray children,String word,int depth,Node parentNode){ final int wordLength=word.length(); final char c=word.charAt(depth); final int childrenLength=children.length; Node childNode=null; boolean found=false; for (int i=0; i < childrenLength; i++) { childNode=children.data[i];...
Searches for the word and add the word if it does not exist.
public static IStatus createError(String message){ return createStatus(IStatus.ERROR,0,message,null); }
Creates a new error status with the given message.
public static Location fromTimeZone(TimeZone timeZone){ if (timeZone == null) { throw new IllegalArgumentException(Logger.logMessage(Logger.ERROR,"Location","fromTimeZone","The time zone is null")); } double millisPerHour=3.6e6; int offsetMillis=timeZone.getRawOffset(); int offsetHours=(int)(offsetMillis ...
Constructs an approximate location for a specified time zone. Used when selecting an initial navigator position based on the device's current time zone.
private void writeObjectToJsonFile(Object object,File jsonFile,Map<String,Object> args) throws IOException { FileOutputStream outputStream=new FileOutputStream(jsonFile); JsonWriter jsonWriter=new JsonWriter(outputStream,args); jsonWriter.write(object); outputStream.close(); jsonWriter.close(); }
Writes an <tt>Object</tt> into a JSON formatted file using Json-IO
private void initFind(){ log.config(""); for (int i=0; i < m_findFields.length; i++) { GridField mField=m_findFields[i]; if (mField.getVO().displayType == DisplayType.YesNo) { GridFieldVO vo=mField.getVO(); GridFieldVO ynvo=vo.clone(vo.ctx,vo.WindowNo,vo.TabNo,vo.AD_Window_ID,vo.AD_Tab_ID,vo.tab...
Dynamic Init.6 Set up GridController
public XMLEditorKit(XMLContext context){ super(); factory=new XMLViewFactory(); if (context == null) { this.context=new XMLContext(); } else { this.context=context; } }
Creates a new instance of XMLEditorKit
public static int readHttpHeader(InputStream sckInputStream,byte[] buffer,int byteOffset) throws IOException { int count=0; byte last=0; byte current=0; boolean isEscapeOnce=false; boolean isEscapeTwiceTry=false; buffer[byteOffset + count++]=last=readByte(sckInputStream); while (true) { current=readBy...
read http header from socket into buffer
public final Vec3D crossSelf(Vec3D v){ final float cx=y * v.z - v.y * z; final float cy=z * v.x - v.z * x; z=x * v.y - v.x * y; y=cy; x=cx; return this; }
Calculates cross-product with vector v. The resulting vector is perpendicular to both the current and supplied vector and overrides the current.
public boolean isMandatory(){ return m_mandatory; }
Is Field mandatory
private void disconnected(Bundle data){ clientHandle=null; IMqttToken token=removeMqttToken(data); if (token != null) { ((MqttTokenAndroid)token).notifyComplete(); } if (callback != null) { callback.connectionLost(null); } }
Process a notification that we have disconnected
public BitSet(){ bits=ALL_CLEARED; }
Creates a new bit-set (all bits cleared).
public double sum2(){ double s2=0; for (int i=0; i < size(); i++) { s2+=V[i] * V[i]; } return s2; }
Returns the squared sum of all elements in the vector.
public boolean has(String nodeUrl){ for ( MuninNode node : this.children) { if (node.getUrl().equals(nodeUrl)) return true; } return false; }
Checks if this master contains a node, based on its URL
public DSubjectKeyIdentifier(JDialog parent,byte[] value,PublicKey subjectPublicKey) throws IOException { super(parent); setTitle(res.getString("DSubjectKeyIdentifier.Title")); this.subjectPublicKey=subjectPublicKey; initComponents(); prepopulateWithValue(value); }
Creates a new DSubjectKeyIdentifier dialog.
public static AztecCode encode(byte[] data){ return encode(data,DEFAULT_EC_PERCENT,DEFAULT_AZTEC_LAYERS); }
Encodes the given binary content as an Aztec symbol
public static boolean isAmbiguous(String str){ return null != ambiguousHashTable.get(str); }
A hashtable of all built-in symbols that can appear as ordinary punctuation. The entry for a symbol is the TeX string that produces it. (That string need work only outside math mode.)
public void runTest() throws Throwable { Document doc; DOMImplementation domImpl; boolean state; doc=(Document)load("staff",false); domImpl=doc.getImplementation(); state=domImpl.hasFeature("xml","2.0"); assertTrue("domimplementationFeaturexmlVersion2Assert",state); }
Runs the test case.
public PurityResult scan(Tree node,PurityResult p){ return node == null ? p : node.accept(this,p); }
Scan a single node.
public CrowdSourcePage(){ crowdSourceForm=new CrowdSourceForm("crowdSourceForm"); add(crowdSourceForm); crowdJobForm=new CrowdJobForm("crowdJobForm"); crowdJobForm.setVisible(false); add(crowdJobForm); crowdDocumentListForm=new CrowdDocumentListForm("crowdDocumentListForm"); crowdDocumentListForm.setVisib...
Crowd source page, user interface to manage and upload Crowdjobs with WebAnno
public CheckerInfo(final String label,final Class<? extends SourceChecker> checker,final String qualsPath){ this(label,checker.getCanonicalName(),qualsPath); }
Sets the name and processor accordingly.
public boolean isSupportedMethod(SootMethod method){ if (safe_methods.contains(method) || spec_methods.contains(method)) return true; if (spec_methods.containsPoly(method)) return true; return safe_methods.containsPoly(method); }
Return true if this method is contained in the list of safe or spec methods. Return false if a banned method or if a user method. This method will perform a polymorphic search.
protected void initialize(){ if (getUnsortedModel() == null) { m_SortedIndices=null; m_DisplayIndices=null; m_ColumnIsNumeric=null; } else { initializeSortIndices(); initializeColumnTypes(); m_DisplayIndices=null; m_SortColumn=-1; m_SortAscending=true; getUnsortedModel().addTabl...
Initializes indices etc.
public void sample() throws RemoteException { assert updateBuffer != null; ((PerfDataBuffer)pdb).sample(updateBuffer); }
Get a copy of the remote instrumentation buffer. <p> The data in the remote instrumentation buffer is copied into a local byte buffer.
public JSONObject put(String key,long value) throws JSONException { this.put(key,new Long(value)); return this; }
Put a key/long pair in the JSONObject.
public void forget(){ table.clear(); }
Clears out the table to start fresh.
public static String stripComments(String s,ParseResult result){ int commentStart=s.indexOf(";"); if (commentStart != -1) { s=s.substring(0,commentStart); result.commentStartPos=commentStart; int index=s.indexOf(" , "); while (index > -1) { result.commentStartPos-=2; index=s.indexOf(" , ...
Removes comments from a line of code. Comments are recognised by their beginning ";"
public ReusableInternalIdToLongIterator initializeLeftInternalIdToLongIterator(){ return new NodeMetadataInternalIdToLongIterator(getRightNodesToIndexBiMap(),getRightNodesToMetadataMap(),edgeTypeMask); }
Create a reusable internal id to long iterator.
private void processAnsiCommand_L(){ }
Insert one or more blank lines. The current line of text moves down. Text that falls off the bottom of the screen is deleted.
private int calculateMenuMargin(){ WindowManager wm=(WindowManager)getSystemService(Context.WINDOW_SERVICE); Display display=wm.getDefaultDisplay(); Point size=new Point(); display.getSize(size); int height=size.y; return (int)Math.round(height * MENU_MARGIN_RELATIVE_MODIFIER); }
Method that calculates space left for EditText when format text panel is Visible
@SuppressWarnings("rawtypes") private void modifyGroupClones(StorageSystem storageSystem,List<URI> clones,int operationValue) throws Exception { callEMCRefreshIfRequired(_dbClient,_helper,storageSystem,clones); List<Volume> cloneVols=_dbClient.queryObject(Volume.class,clones); List<CIMObjectPath> syncPaths=new Ar...
It would call modifyListSynchronization for synchronized operations, e.g. fracture, detach, etc
public Boolean isRTPMulticast(){ return rtpMulticast; }
Ruft den Wert der rtpMulticast-Eigenschaft ab.
private String createTempindexDir(SolrCore core,String tmpIdxDirName){ String tmpIdxDir=core.getDataDir() + tmpIdxDirName; return tmpIdxDir; }
All the files are copied to a temp dir first
private void updateConsistencyGroup(){ log.info("Migrating consistency group"); DbClient dbClient=getDbClient(); List<URI> cgURIs=dbClient.queryByType(BlockConsistencyGroup.class,true); Iterator<BlockConsistencyGroup> cgs=dbClient.queryIterativeObjects(BlockConsistencyGroup.class,cgURIs); while (cgs.hasNext()...
Migrate consistency group instances to set arrayConsistency to true
public OFNiciraVendorData(){ }
Construct empty (i.e. unspecified data type) Nicira vendor data.
public static double P_ExactMatch(int Y[][],int Ypred[][]){ return 1. - L_ZeroOne(Y,Ypred); }
Exact Match, i.e., 1 - [0/1 Loss].
public synchronized String toLines(){ StringBuilder buff=new StringBuilder(); for ( Entry<Object,Object> e : new TreeMap<Object,Object>(this).entrySet()) { buff.append(e.getKey()).append('=').append(e.getValue()).append('\n'); } return buff.toString(); }
Convert the map to a list of line in the form key=value.
private static int bufToHash(@NoLength char[] buf,int len){ int hash2=0; int hash=len; hash<<=5; hash+=buf[0] - 0x60; int j=len; for (int i=0; i < 4 && j > 0; i++) { j--; hash<<=5; hash+=buf[j] - 0x60; hash2<<=6; hash2+=buf[i] - 0x5F; } return hash ^ hash2; }
This method has to return a unique integer for each well-known lower-cased attribute name.
public static org.oscm.internal.vo.VOParameter convertToUp(org.oscm.vo.VOParameter oldVO){ if (oldVO == null) { return null; } org.oscm.internal.vo.VOParameter newVO=new org.oscm.internal.vo.VOParameter(); newVO.setKey(oldVO.getKey()); newVO.setVersion(oldVO.getVersion()); newVO.setParameterDefinition(c...
Convert source version VO to target version VO.
@Override public void endElement(String namespaceURI,String localName,String qName){ if (this.root instanceof CategoryDatasetHandler) { CategoryDatasetHandler handler=(CategoryDatasetHandler)this.root; Iterator iterator=this.values.getKeys().iterator(); while (iterator.hasNext()) { Comparable key=(C...
The end of an element.
public void testMoveDirectoryDestinationRootSourceMissing() throws Exception { create(igfsSecondary,paths(DIR,SUBDIR,SUBSUBDIR),null); create(igfs,null,null); igfs.rename(SUBSUBDIR,IgfsPath.ROOT); checkExist(igfs,DIR,SUBDIR); checkExist(igfs,igfsSecondary,new IgfsPath("/" + SUBSUBDIR.name())); checkNotExist...
Test directory move when destination is the root and source is missing.
public boolean isSetVersionedValue(){ return this.versionedValue != null; }
Returns true if field versionedValue is set (has been assigned a value) and false otherwise
public void testMalformedForLength(){ assertNotNull(CoderResult.malformedForLength(Integer.MAX_VALUE)); assertNotNull(CoderResult.malformedForLength(1)); assertSame(CoderResult.malformedForLength(1),CoderResult.malformedForLength(1)); assertNotSame(CoderResult.malformedForLength(1),CoderResult.unmappableForLeng...
Test method malformedForLength(int).
public void addElement(Element e){ v.addElement(e); }
Add an element to the end of the list
public static Long[] valuesOf(long[] array){ Long[] dest=new Long[array.length]; for (int i=0; i < array.length; i++) { dest[i]=Long.valueOf(array[i]); } return dest; }
Converts to object array.
public static long intArrayToLong(final int[] src,final int srcPos,final long dstInit,final int dstPos,final int nInts){ if ((src.length == 0 && srcPos == 0) || 0 == nInts) { return dstInit; } if ((nInts - 1) * 32 + dstPos >= 64) { throw new IllegalArgumentException("(nInts-1)*32+dstPos is greather or equ...
<p> Converts an array of int into a long using the default (little endian, Lsb0) byte and bit ordering. </p>
private final void releaseDTMXRTreeFrags(){ if (m_DTMXRTreeFrags == null) { return; } final Iterator iter=(m_DTMXRTreeFrags.values()).iterator(); while (iter.hasNext()) { DTMXRTreeFrag frag=(DTMXRTreeFrag)iter.next(); frag.destruct(); iter.remove(); } m_DTMXRTreeFrags=null; }
Cleans DTMXRTreeFrag objects by removing references to DTM and XPathContext objects.
private void initAtpTab(){ if (m_modelAtp != null) return; Vector<String> columnNames=new Vector<String>(); columnNames.add(Msg.translate(Env.getCtx(),"Date")); columnNames.add(Msg.translate(Env.getCtx(),"QtyOnHand")); columnNames.add(Msg.translate(Env.getCtx(),"C_BPartner_ID")); columnNames.add(Msg.trans...
Query ATP
Node cloneOrImportNode(short operation,Node node,boolean deep){ NodeImpl copy=shallowCopy(operation,node); if (deep) { NodeList list=node.getChildNodes(); for (int i=0; i < list.getLength(); i++) { copy.appendChild(cloneOrImportNode(operation,list.item(i),deep)); } } notifyUserDataHandlers(ope...
Returns a copy of the given node or subtree with this document as its owner.
protected void onSetChannelKey(String channel,String sourceNick,String sourceLogin,String sourceHostname,String key){ }
Called when a channel key is set. When the channel key has been set, other users may only join that channel if they know the key. Channel keys are sometimes referred to as passwords. <p> This is a type of mode change and is also passed to the onMode method in the PircBot class. <p> The implementation of this method i...
public static void main(final String[] args){ DOMTestCase.doMain(hc_namednodemapwrongdocumenterr.class,args); }
Runs this test from the command line.
public static int geometric(double p){ return (int)Math.ceil(Math.log(uniform()) / Math.log(1.0 - p)); }
Return an integer with a geometric distribution with mean 1/p.
public boolean isLoggedIn(){ return modules.getAuthModule().isLoggedIn(); }
Convenience method for checking if user logged in
public OMPoly(double latPoint,double lonPoint,int[] xPoints,int[] yPoints,int cMode){ super(RENDERTYPE_OFFSET,LINETYPE_UNKNOWN,DECLUTTERTYPE_NONE); setLocation(latPoint,lonPoint,OMGraphic.DECIMAL_DEGREES,xPoints,yPoints); coordMode=cMode; }
Create an x/y OMPoly at an offset from lat/lon. If you want the poly to be connected, you need to ensure that the first and last coordinate pairs are the same.
public static boolean isAppOnSdcard(PackageManager pm,String packageName){ return isAppEnabled(pm,packageName,PackageManager.GET_UNINSTALLED_PACKAGES); }
Returns true if the app can possibly be on the SDCard. This is just a workaround and doesn't guarantee that the app is on SD card.
private void addSelections(ExpressionSignature signature,String newText,boolean addFirst){ int offset=0; for (int i=0; i < signature.getNumberOfArguments(); i++) { String arg=signature.getArgument(i); int index=newText.indexOf(arg); int end=index + arg.length(); if (0 <= index) { if (addFirst)...
Adds the selections for the given signature in the given text.
public SecretKeySpec(byte[] key,String algorithm){ if (key == null) { throw new IllegalArgumentException("key == null"); } if (key.length == 0) { throw new IllegalArgumentException("key.length == 0"); } if (algorithm == null) { throw new IllegalArgumentException("algorithm == null"); } this.al...
Creates a new <code>SecretKeySpec</code> for the specified key data and algorithm name.
public void sort(){ if (!this.isSorted) { values.sort(); this.isSorted=true; } }
Sorts the receiver.
public IgniteThread(String gridName,String threadName,Runnable r,int grpIdx){ this(DFLT_GRP,gridName,threadName,r,grpIdx); }
Creates grid thread with given name for a given grid.
public int next(){ for (++_currentNode; _sp >= 0; ++_currentNode) { if (_currentNode < _stack[_sp]) { int type=_type2(_currentNode); if (type != ATTRIBUTE_NODE && type != NAMESPACE_NODE) return returnNode(makeNodeHandle(_currentNode)); } else --_sp; } return NULL; }
Get the next node in the iteration.
@Around("operationsMethods()") public Object logMethodBeingInvoked(ProceedingJoinPoint pjp) throws Throwable { Class<?> targetClass=pjp.getTarget().getClass(); MethodSignature targetMethodSignature=(MethodSignature)pjp.getSignature(); Method targetMethod=targetMethodSignature.getMethod(); if (targetMethod.getDe...
Around advice that logs methods being invoked for all DAO operations methods.
public static String formatStackTrace(StackTraceElement[] stack){ List<String> lines=new ArrayList<>(); lines.add("cpu"); lines.add("trace"); for ( StackTraceElement element : stack) { lines.add(formatStackTraceElement(element)); } return Joiner.on(".").join(lines); }
Formats an entire stack trace as a String
public static boolean isRegionDepartureNotificationOk(){ return regionDepartureNotificationDisabled.get() != Boolean.TRUE; }
This was added to fix bug 41111
public static boolean isFlyme(){ try { final Method method=Build.class.getMethod("hasSmartBar"); return method != null; } catch ( final Exception e) { return false; } }
Check whether is running Flyme
public static String resolveUiBinderNamespacePrefix(IStructuredDocument xmlDocument){ IStructuredModel model=StructuredModelManager.getModelManager().getExistingModelForRead(xmlDocument); if (model == null || !(model instanceof IDOMModel)) { return null; } try { return resolveUiBinderNamespacePrefix((ID...
Returns the namespace prefix bound to the UiBinder namespace.
public DefaultModalGraphMouse(){ this(1.1f,1 / 1.1f); }
create an instance with default values
public static void v(String tag,String s){ if (LOG.VERBOSE >= LOGLEVEL) Log.v(tag,s); }
Verbose log message.
private Rops(){ }
This class is uninstantiable.
public void unregister(ICalPropertyScribe<? extends ICalProperty> scribe){ for ( ICalVersion version : ICalVersion.values()) { experimentalPropByName.remove(propertyNameKey(scribe,version)); } experimentalPropByClass.remove(scribe.getPropertyClass()); experimentalPropByQName.remove(scribe.getQName()); }
Unregisters a property scribe
@Override public boolean isRasterFormat(){ return true; }
Used to check if the file is raster format.
public static Intent makeIntent(Context context,Uri videoUri){ return new Intent(context,UploadVideoService.class).setData(videoUri); }
Factory method that makes the explicit intent another Activity uses to call this Service.
public void train(){ try { this.train(null); } catch ( ProcessStoppedException e) { } }
trains the KohonenNet
public static String hex2dec(String s){ try { if (pHex0x.matcher(s).find()) { s=replaceNumber(s,pHex0x,16,2,0); } if (pHexH.matcher(s).find()) { s=replaceNumber(s,pHexH,16,0,1); } if (pHexDollar.matcher(s).find()) { s=replaceNumber(s,pHexDollar,16,1,0); } if (pBinB.matche...
converts hex, oct and bin numbers inside a string into decimal numbers. Numbers need to have appropriate uppercase(!) pre- or suffixes (e.g. "0X...") for hex2dec to know what to do.
private void onMouseOut(){ if (popupMenu != null) { return; } panel.setStyleName(toolbarResources.toolbar().popupButtonPanel()); }
Mouse Out Handler.
public void testDeadlocksDeleteRename() throws Exception { checkDeadlocksRepeat(5,2,2,2,RENAME_CNT,DELETE_CNT,0,0,0); }
Ensure that deadlocks do not occur during concurrent delete & rename operations.
@Override public void onActivityCreated(Bundle savedInstanceState){ super.onActivityCreated(savedInstanceState); mProgressBar=(ProgressBar)getTargetFragment().getView().findViewById(R.id.progress_horizontal); synchronized (mThread) { mReady=true; mThread.notify(); } }
This is called when the Fragment's Activity is ready to go, after its content view has been installed; it is called both after the initial fragment creation and after the fragment is re-attached to a new activity.
public synchronized boolean isLoaded(){ return loaded; }
Indicates if this tile's underlying image has been successfully loaded yet.
public void dropObject(DatabaseObjectDefinition databaseObjectDefinition) throws EclipseLinkException { boolean usesBatchWriting=false; if (getSession().getPlatform().usesBatchWriting()) { usesBatchWriting=true; getSession().getPlatform().setUsesBatchWriting(false); } try { collectDatabaseSchemasFor...
Use the definition object to drop the schema entity from the database. This is used for dropping tables, views, procedures ... etc ...
private void savePlaybackQueue(){ SharedPreferences queuePrefs=getSharedPreferences(QUEUE_SHARED_PREFS,MODE_PRIVATE); mPlaybackQueue.save(queuePrefs.edit()); queuePrefs.edit().putInt("current",mCurrentTrack).apply(); }
Saves the playback queue in the local storage
@Override public void resize(int width,int height){ viewport.update(width,height,true); Gdx.app.log(TAG,"Viewport world dimensions: (" + viewport.getWorldHeight() + ", "+ viewport.getWorldWidth()+ ")"); }
When the screen is resized, we need to inform the viewport. Note that when using an ExtendViewport, the world size might change as well.
public String sql_selectPreparedStatement(String vendorName,String catalogName,String schemaName,String tableName,ArrayList<String> whereColumnNames){ ArrayList<String> columnNames=null; ArrayList<String> aliasNames=null; ArrayList<String> conditions=null; ArrayList<String> sortColumns=null; if (whereColumnNa...
gets the database specific SQL command to select records from a table as prepared statement
protected Dimension calcPreferredSize(){ Dimension d=new Dimension(0,0); return d; }
Calculates the preferred size based on component content. This method is invoked lazily by getPreferred size.
protected boolean isLocalServer(MailAddress recipient){ try { return getConfiguration().getDomainList().containsDomain(recipient.getDomain()); } catch ( DomainListException e) { getLogger().error("Unable to access DomainList",e); return false; } }
Method isLocalServer.
private void returnData(Object ret){ if (myHost != null) { myHost.returnData(ret); } }
Used to communicate a return object from a plugin tool to the main Whitebox user-interface.
public static boolean checkWifiIsActive(Context context){ ConnectivityManager connec=(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); android.net.NetworkInfo wifi=connec.getNetworkInfo(ConnectivityManager.TYPE_WIFI); if (wifi.isConnected()) { return true; } return false; }
Checks wifi is active.
@SuppressWarnings("IfMayBeConditional") public static String typeName(String cls){ if (Boolean.class.getName().equals(cls) || boolean.class.getName().equals(cls)) return "BOOLEAN"; else if (Byte.class.getName().equals(cls) || byte.class.getName().equals(cls)) return "TINYINT"; else if (Short.class.getName()...
Converts Java class name to SQL type name.
public void rejectInvitation() throws RcsGenericException { try { mSharingInf.rejectInvitation(); } catch ( Exception e) { throw new RcsGenericException(e); } }
Rejects image sharing invitation
public sub addElement(Element element){ addElementToRegistry(element); return (this); }
Adds an Element to the element.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-19 13:30:38.166 -0400",hash_original_method="9CE94D17A12EDE30B7CAE8D136113E99",hash_generated_method="650813DD8E487A5BC9B795C4E00B486D") private void showPopupUnchecked(int maxActivityCount){ if (mAdapter.getDataMo...
Shows the popup no matter if it was already showing.
public BFSDistanceLabeler(){ mPredecessorMap=new HashMap<V,HashSet<V>>(); }
Creates a new BFS labeler for the specified graph and root set The distances are stored in the corresponding Vertex objects and are of type MutableInteger
public RootBlockView(final boolean rootBlock0,final int offsetBits,final long nextOffset,final long firstCommitTime,final long lastCommitTime,final long commitCounter,final long commitRecordAddr,final long commitRecordIndexAddr,final UUID uuid,final long blockSequence,final long quorumToken,final long metaStartAddr,fin...
Create a new read-only root block image with a unique timestamp. The other fields are populated from the supplied parameters.
public static String chooseName(String name,Method method){ if (name == null || name.isEmpty()) { name=method.getName(); } return name; }
If name is empty, use the name of the given method. Otherwise use name
private void calcCoordinates(final float x,final float[][] Trm,float charSpacing){ final float[][] trm=new float[3][3]; for (int xx=0; xx < 3; xx++) { System.arraycopy(Trm[xx],0,trm[xx],0,3); } x1=x; x2=trm[2][0] - (charSpacing * trm[0][0]); if (glyphData.isHorizontal()) { if (trm[1][0] < 0) { ...
Calculate the x coords for text here y coords are calculated in the method processTextArray(final byte[] stream,int startCommand,int dataPointer)
public synchronized void prepend(String k,String v){ grow(); for (int i=nkeys; i > 0; i--) { keys[i]=keys[i - 1]; values[i]=values[i - 1]; } keys[0]=k; values[0]=v; nkeys++; }
Prepends a key value pair to the beginning of the header. Duplicates are allowed
public synchronized void flushClass(String classname){ classes.remove(classname); softcache.remove(classname); }
Flush a class
public Vector3f rotate(Quaternionfc quat){ quat.transform(this,this); return this; }
Rotate this vector by the given quaternion <code>quat</code> and store the result in <code>this</code>.
public Vset checkInsideClass(Environment env,Context ctx,Vset vset) throws ClassNotFound { if (!isInsideLocal() || isLocal()) { throw new CompilerError("checkInsideClass"); } return checkInternal(env,ctx,vset); }
Check a class which is inside a local class, but is not itself local.
public Geo3DPoint(String name,double x,double y,double z){ super(name,TYPE); fillFieldsData(x,y,z); }
Creates a new Geo3DPoint field with the specified x,y,z.
public void runTest() throws Throwable { Document doc; Element element1; Element element2; Attr attribute; Attr newAttribute; NodeList elementList; String nullNS=null; doc=(Document)load("staffNS",true); elementList=doc.getElementsByTagNameNS("http://www.nist.gov","address"); element1=(Element)eleme...
Runs the test case.
public void testRandomQueries() throws Exception { MemoryIndex index=randomMemoryIndex(); for (int i=0; i < ITERATIONS; i++) { assertAgainstRAMDirectory(index); } }
runs random tests, up to ITERATIONS times.