code
stringlengths
10
174k
nl
stringlengths
3
129k
private void connectParkAndRide(int centerVertex,Coordinate coord,EdgeStore.Edge edge){ Split split=Split.findOnEdge(coord.y,coord.x,edge); int targetVertex=splitEdge(split); EdgeStore.Edge created=edgeStore.addStreetPair(centerVertex,targetVertex,1,-1); created.allowAllModes(); created.setFlag(EdgeStore.Edge...
Connect a park and ride vertex to the street network at a particular location and edge
private void processPutStatic(Instruction s){ Operand value=PutStatic.getValue(s); if (value.isConstant()) { findOrCreateVertex((ConstantOperand)value); } }
Update the value graph to account for a given PUTSTATIC instruction. <p><b>PRECONDITION:</b> <code> PutStatic.conforms(s); </code> Make sure we have value graph nodes for a constant value
public void configurePowerPerdition(int powerLoss,int powerLossRegularity){ if (powerLoss == 0 || powerLossRegularity == 0) { perdition=new PerditionCalculator(0); return; } perdition=new PerditionCalculator((float)powerLoss / (float)powerLossRegularity); }
Allows you define perdition in terms of loss/ticks. This function is mostly for legacy implementations. See PerditionCalculator for more complex perdition formulas.
private boolean isGreenTimeLeft(double currentTime,Id<SignalGroup> groupId,int maxGreenTime){ if (!this.greenGroupId2OnsetMap.containsKey(groupId)) { return false; } int greenTime=(int)(currentTime - this.greenGroupId2OnsetMap.get(groupId)); return greenTime < maxGreenTime; }
Checks whether the maximal green time of the signal is already reached.
public Set<HttpMethod> allowedRequestMethods(){ ensureEnabled(); return allowedRequestMethods; }
Returns the allowed set of Request Methods. The Http methods that should be returned in the CORS 'Access-Control-Request-Method' response header.
public void addRemove(Edge removalEdge){ removes.add(removalEdge); }
Add another remove operation to the GraphChange.
public void testBug11798() throws Exception { try { this.pstmt=this.conn.prepareStatement("SELECT ?"); this.pstmt.setObject(1,Boolean.TRUE,Types.BOOLEAN); this.pstmt.setObject(1,new BigDecimal("1"),Types.BOOLEAN); this.pstmt.setObject(1,"true",Types.BOOLEAN); } finally { if (this.pstmt != null...
Tests fix for BUG#11798 - Pstmt.setObject(...., Types.BOOLEAN) throws exception.
public String columnName(){ return columnName; }
Get the name of the table.
private StringMap populateDbMetrics(final VNXeNasServer nasServer,VNXeApiClient client){ StringMap dbMetrics=new StringMap(); long totalProvCap=0L; long totalFsCount=0L; int nfsSharesCount=0; int cifsSharesCount=0; List<VNXeFileSystem> fileSystemList=client.getFileSystemsForNasServer(nasServer.getId()); i...
Calculate nas server metrics
public Taxonomy subset(Collection<Integer> ids){ final Taxonomy subset=new Taxonomy(); subset.addPaths(this,ids); return subset; }
Returns a subset of the taxonomy that contains nodes with the given <code>ids</code> and their ancestors back to the root.
void updateText(Element target){ if (target.text == null) { target.text=new LinkedList<>(); target.text.add(new Segment(target.start.right + 1,target.start.right)); } final Iterator<Segment> segIt=target.text.iterator(); final Segment first=segIt.next(); while (segIt.hasNext()) { final Segment rem...
Updates element text content. Update based on element text segments. If element doesn't have any text segment then new segment will be created which positions based on container bounds, otherwise only first text segment will be used for update, other text segments will be removed.
public void rank(String r){ optionalRank="rankdir = " + r + ";"; }
Rank orientation of the figure.
public IdsQueryBuilder ids(String... ids){ return addIds(ids); }
Adds ids to the filter.
private Connection createConnection() throws RemoteException { Connection conn; TCPTransport.tcpLog.log(Log.BRIEF,"create connection"); if (!usingMultiplexer) { Socket sock=ep.newSocket(); conn=new TCPConnection(this,sock); try { DataOutputStream out=new DataOutputStream(conn.getOutputStream());...
Create a new connection to the remote endpoint of this channel. The returned connection is new. The caller must already have passed a security checkConnect or equivalent.
protected void addNewIcon(){ if (log.isDebugEnabled()) { log.debug("addNewIcon Action: iconMap.size()= " + _iconMap.size()); } String name=JOptionPane.showInputDialog(this,Bundle.getMessage("NoIconName"),null); if (name == null || name.trim().length() == 0) { return; } if (_iconMap.get(name) != null...
Action item for initButtonPanel
public SubscriptionStateException(String message){ super(message); }
Constructs a new exception with the specified detail message. The cause is not initialized.
public VNXeCommandResult deleteSnap(String snapId) throws VNXeException { _url=URL_INSTANCE + snapId; setQueryParameters(null); deleteRequest(null); VNXeCommandResult result=new VNXeCommandResult(); result.setSuccess(true); return result; }
Delete lun snap
public ProviderException(String s){ super(s); }
Constructs a ProviderException with the specified detail message. A detail message is a String that describes this particular exception.
public void loadThis(){ if ((access & Opcodes.ACC_STATIC) != 0) { throw new IllegalStateException("no 'this' pointer within static method"); } mv.visitVarInsn(Opcodes.ALOAD,0); }
Generates the instruction to load 'this' on the stack.
private File makeFile(){ return storagePath == null ? new File(contextTempDir,swapFileName) : new File(storagePath,swapFileName); }
Make file.
@Override public boolean blockInteract(GlowPlayer player,GlowBlock block,BlockFace face,Vector clickedLoc){ if (block.getType() == Material.IRON_DOOR_BLOCK) { return false; } GlowBlockState state=block.getState(); MaterialData data=state.getData(); if (data instanceof Door) { Door door=(Door)data; ...
Opens and closes the door when right-clicked by the player.
public static Signature generateRandomSignature(){ final byte[] bytes=Utils.generateRandomBytes(64); return new Signature(bytes); }
Generates a random signature.
public static double cauchy(){ return Math.tan(Math.PI * (uniform() - 0.5)); }
Returns a real number with a Cauchy distribution.
protected SpatialSparseVertex(Point point){ this.point=point; }
Creates an isolated vertex located at point <tt>point</tt>.
@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:45.518 -0500",hash_original_method="6C3F9593FC3095346100149D0CBBAD3F",hash_generated_method="74BFDE300F5DD4E078EA04A4A8181904") public void sendMessage(int what,int arg1){ Message msg=...
Send a message to the destination handler
public static boolean uploadFile(File file,String uploadurl){ HttpURLConnection conn=null; DataOutputStream dos=null; String lineEnd="\r\n"; String twoHyphens="--"; String boundary="*****"; int bytesRead, bytesAvailable, bufferSize; byte[] buffer; int maxBufferSize=64 * 1024; boolean isSuccess=true; ...
Copied (and slightly modified) from Friends and Family
protected static void fatal(String msg,Throwable t){ System.out.println(msg); if (t != null) t.printStackTrace(); fail(); }
Abort following a fatal error.
public void saveAll(){ for ( String key : items.keySet()) { items.get(key).save(); } }
save all settings values at StorageInterface
public static Reader createReader(File file,boolean async) throws IOException { final InputStream is=createInputStream(file,async); return new InputStreamReader(is); }
Creates a <code>Reader</code> for a file automatically choosing between basic file input, gzip input and bzip2 input based on file extension.
public static Snackbar make(Activity activity,View view,int resourceId,int duration){ return make(activity,view,activity.getResources().getString(resourceId),duration); }
Creates a snackbar that can handle a translucent navigation bar instead of popping up under it. Expects a CoordinatorLayout as the provided view or as a parent at some point in the view hierarchy.
public Optional<Path> outputFilePath(){ return maybePath(outputFilePathArg); }
Returns the location in which to store the response proto.
public static byte[] serializeInt(int val){ byte[] buffer=new byte[Type.INTEGER.getByteSize()]; buffer[0]=(byte)((val >> 24) & 0xFF); buffer[1]=(byte)((val >> 16) & 0xFF); buffer[2]=(byte)((val >> 8) & 0xFF); buffer[3]=(byte)(val & 0xFF); return buffer; }
Serializes the given integer value.
public T caseVarDefinition(VarDefinition object){ return null; }
Returns the result of interpreting the object as an instance of '<em>Var Definition</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
private static String replace_non_letters_non_numbers_with_whitespace(String a_string){ return regex.sub(" ",a_string); }
""" This function replaces any sequence of non letters and non numbers with a single white space. """
private void disableUnsupportedButtons(){ if (mPlayer == null) { return; } try { if (mPauseButton != null) { if (!mPlayer.canPause()) { mPauseButton.setEnabled(false); } else { mPauseButton.setEnabled(true); } } if (mRewButton != null) { if (!mPlayer.canSee...
Disable pause or seek buttons if the stream cannot be paused or seeked. This requires the control interface to be a IEPlayerControlExt
public static Observable<Integer> intermittentBursts(){ return Observable.create(null).subscribeOn(Schedulers.newThread()); }
This is an artificial source to demonstrate an infinite stream that bursts intermittently
private void markSubroutineWalkDFS(final BitSet sub,int index,final BitSet anyvisited){ while (true) { AbstractInsnNode node=instructions.get(index); if (sub.get(index)) { return; } sub.set(index); if (anyvisited.get(index)) { dualCitizens.set(index); if (LOGGING) { log("...
Performs a simple DFS of the instructions, assigning each to the subroutine <code>sub</code>. Starts from <code>index</code>. Invoked only by <code>markSubroutineWalk()</code>.
public static void main(String[] args) throws Exception { AbstractMultiLabelClassifier.evaluation(new PLST(),args); }
Main method for testing.
private BarData generateData(int cnt){ ArrayList<BarEntry> entries=new ArrayList<BarEntry>(); for (int i=0; i < 12; i++) { entries.add(new BarEntry((int)(Math.random() * 70) + 30,i)); } BarDataSet d=new BarDataSet(entries,"New DataSet " + cnt); d.setBarSpacePercent(20f); d.setColors(ColorTemplate.VORDIP...
generates a random ChartData object with just one DataSet
public XmlDocument(String namespace,String namespacePrefix,String schemaLocation,String rootNodeName){ set(namespace,namespacePrefix,schemaLocation,rootNodeName); DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance(); DocumentBuilder builder; try { builder=factory.newDocumentBuilder(); } ca...
Converts the given technical products to a dom document.
private void cancelAcquire(Node node){ if (node == null) return; node.thread=null; Node pred=node.prev; while (pred.waitStatus > 0) node.prev=pred=pred.prev; Node predNext=pred.next; node.waitStatus=Node.CANCELLED; if (node == tail && compareAndSetTail(node,pred)) { compareAndSetNext(pred,predNext...
Cancels an ongoing attempt to acquire.
public void testAttachFragmentUi_doesNotShowSpinnerDuringSyncWhenLocationsPresent(){ mFakeSyncManager.setSyncing(true); mController.init(); LocationTree locationTree=FakeAppLocationTreeFactory.build(); mFakeEventBus.post(new AppLocationTreeFetchedEvent(locationTree)); mController.attachFragmentUi(mMockFragmen...
Tests that attaching a fragment UI does not show the spinner when locations are present, even if a sync is occurring.
private SignatureLibraryRelease loadCoilsRelease(){ final SignatureLibraryRelease release; final Query releaseQuery=entityManager.createQuery("select r from SignatureLibraryRelease r where r.version = :coilsVersion and r.library = :coilsSignatureLibrary"); releaseQuery.setParameter("coilsVersion",coilsReleaseVers...
This private method is responsible for retrieving OR persisting (as appropriate) a SignatureLibraryRelease method for the version of Coils being handled by this DAO.
public void goBackExecuteLogic(ActionMapping mappings,ActionForm form,HttpServletRequest request,HttpServletResponse response){ Boolean showInformeBusqueda=(Boolean)getFromTemporalSession(request,Constants.SHOW_INFORME_BUSQUEDA_BUTTON); InvocationStack invocationStack=getInvocationStack(request); ClientInvocation...
Metodo a ejecutar cuando desde la interfaz se realize un cancel.
public boolean isMirrored(){ return this.isMirrored; }
Returns true if this map has been mirrored after reading
private void addNode(BasicBlock b){ DominatorTreeNode node=new DominatorTreeNode(b); dominatorInfoMap[b.getNumber()]=node; }
Creates dominator tree nodes for the passed block and adds them to the map.
public void passthroughAll() throws Exception { packetValues.addAll(readableObjects); readableObjects.clear(); if (inputBuffer.readableBytes() > 0) { passthrough(Type.REMAINING_BYTES); } }
Take all the inputs and write them to the output.
protected void populatePointsAndSegments(Route bestRoute,List newPoints,List segments){ Projection proj=getProjection(); Intersection origin=bestRoute.getOriginIntersection(); if (logger.isLoggable(Level.INFO)) logger.info("adding " + bestRoute.roads.length + " new roads."); Road road=null; Intersection fro...
Iterates over route, populating points and segments lists. Worries about sequence order of from and to points, i.e. end of one road should be the start of the next. This is not guaranteed by the route, so we have to check.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:02.473 -0500",hash_original_method="5F8F6FBE2B483385DE74A4590AA58F82",hash_generated_method="07562B0E23EB401F9C7EE26FB1759915") @DSVerified @DSSpec(DSCat.IO) @DSSink({DSSinkKind.NETWORK}) public int help() throws IOException { ret...
A convenience method to send the SMTP HELP command to the server, receive the reply, and return the reply code. <p>
protected void initializeAllLiveAttributes(){ super.initializeAllLiveAttributes(); initializeLiveAttributes(); }
Initializes all live attributes for this element.
public void add(Object o1,Object o2){ table.put(o1,o2,value); }
Adds an entry to the set.
public void loadByteArray(SdfBuffer buffer){ buffer.setAtIndexAndInc(byte1); buffer.setAtIndexAndInc(byte2); super.loadByteArray(buffer); }
Store into a buffer.
public RoutedRequest(final RequestWrapper req,final HttpRoute route){ super(); this.request=req; this.route=route; }
Creates a new routed request.
static int mysqlToJavaType(int mysqlType){ int jdbcType; switch (mysqlType) { case MysqlDefs.FIELD_TYPE_NEW_DECIMAL: case MysqlDefs.FIELD_TYPE_DECIMAL: jdbcType=Types.DECIMAL; break; case MysqlDefs.FIELD_TYPE_TINY: jdbcType=Types.TINYINT; break; case MysqlDefs.FIELD_TYPE_SHORT: jdbcType=Types.SMALLINT; break; c...
Maps the given MySQL type to the correct JDBC type.
public static _Fields findByName(String name){ return byName.get(name); }
Find the _Fields constant that matches name, or null if its not found.
public static Geometry combine(Geometry g0,Geometry g1,Geometry g2){ GeometryCombiner combiner=new GeometryCombiner(createList(g0,g1,g2)); return combiner.combine(); }
Combines three geometries.
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.
private void applyLocale(ConfigurationItem item){ String tooltip=controllerAccess.getMessage(locale,MSG_TOOLTIP_PREFIX + item.getKey(),new Object[0]); if (tooltip != null && !tooltip.startsWith("!")) { item.setTooltip(tooltip); } else { item.setTooltip(null); } String displayName=controllerAccess.get...
Apply current locale to given configuration item
public void addRecord(Object[] values) throws DBFException { if (this.fieldArray == null) { throw new DBFException("Fields should be set before adding records"); } if (values == null) { throw new DBFException("Null cannot be added as row"); } if (values.length != this.fieldArray.length) { throw ne...
Add a record to the dbf. Note that this method actually writes the record to a temporary ArrayList and that the file will not be updated until the write() method is called.
@SuppressLint("Wakelock") public static WakeLock acquireWakeLock(Context context,WakeLock wakeLock){ Log.i(TAG,"Acquiring wake lock."); try { PowerManager powerManager=(PowerManager)context.getSystemService(Context.POWER_SERVICE); if (powerManager == null) { Log.e(TAG,"Power manager null."); ret...
Acquire a wake lock if not already acquired.
public void updateFrom(GitVcsSettings settings){ switch (settings.getUpdateType()) { case REBASE: myForceRebaseRadioButton.setSelected(true); break; case MERGE: myForceMergeRadioButton.setSelected(true); break; case BRANCH_DEFAULT: myBranchDefaultRadioButton.setSelected(true); break; default : assert false : "Unk...
Update panel according to settings
private void manageInsertRequest(Mail mail) throws MessagingException { MailAddress senderMailAddress=mail.getSender(); String senderUser=senderMailAddress.getLocalPart().toLowerCase(Locale.US); String senderHost=senderMailAddress.getDomain().toLowerCase(Locale.US); senderUser=getPrimaryName(senderUser); Conn...
Manages an insert request.
private void computeImpliedCovar(){ TetradMatrix implCovarC=MatrixUtils.impliedCovar(edgeCoef().transpose(),errCovar()); int size=getMeasuredNodes().size(); this.implCovarMeasC=new TetradMatrix(size,size); for (int i=0; i < size; i++) { for (int j=0; j < size; j++) { this.implCovarMeasC.set(i,j,implCo...
Computes the implied covariance matrices of the Sem. There are two: <code>implCovar </code> contains the covariances of all the variables and <code>implCovarMeas</code> contains covariance for the measured variables only.
private void checkpointVar(double newDist){ checkpointedDistance=newDist; checkpointedConcreteValue=intVar.getConcreteValue(); }
Saves a new checkpoint for the current value and the current distance.
public static void testConnection(final Window parent,final CDatabaseConfiguration configuration){ try { connect(configuration).closeConnection(); CMessageBox.showInformation(parent,"Successfully connected to the database."); } catch ( final CouldntLoadDriverException exception) { final String message...
Tests a connection to a database.
@Override public int calculateHash(RowCursor cursor){ return table().getPodHash(cursor); }
Returns the hash code for the owning partition. If the hash is negative, the query does not have an owning partition.
public PathImpl fsWalk(String userPath,Map<String,Object> attributes,String path){ ArrayList<PathImpl> pathList=getMergePaths(); if (!userPath.startsWith("/") || pathList.size() == 0) return new MergePath((MergePath)_root,userPath,attributes,path); String bestPrefix=null; for (int i=0; i < pathList.size(); i+...
Walking down the path just extends the path. It won't be evaluated until opening.
@Override public boolean equals(Object otherRules){ if (this == otherRules) { return true; } if (otherRules instanceof ZoneRules) { ZoneRules other=(ZoneRules)otherRules; return Arrays.equals(standardTransitions,other.standardTransitions) && Arrays.equals(standardOffsets,other.standardOffsets) && Arra...
Checks if this set of rules equals another. <p> Two rule sets are equal if they will always result in the same output for any given input instant or local date-time. Rules from two different groups may return false even if they are in fact the same. <p> This definition should result in implementations comparing their e...
public void endAnimation(){ if (mAnimation != null) { mAnimation.end(); mAnimation=null; } }
Jumps to the end of the current logo animation, if any.
public void paint(Graphics a,JComponent b){ for (int i=0; i < uis.size(); i++) { ((ComponentUI)(uis.elementAt(i))).paint(a,b); } }
Invokes the <code>paint</code> method on each UI handled by this object.
private String wrapFormattedStringToWidth(String string,int maxWidth){ int j=this.sizeStringToWidth(string,maxWidth); if (string.length() <= j) { return string; } else { String s1=string.substring(0,j); char c0=string.charAt(j); boolean flag=c0 == 32 || c0 == 10; String s2=string.substring(j ...
Inserts newline and formatting into a string to wrap it within the specified width.
private static long speed(long bytes,long time){ if (time > 0) { double bytesScaled=bytes * 100000d; double timeScaled=time / 10000d; return (long)(bytesScaled / timeScaled); } else return -1L; }
Calculate speed of bytes processing.
public void elementChanged(CnATreeElement element){ try { element=replaceEntityInCache(element); updateParentInCache(element); } catch ( RuntimeException re) { LOG.error("RuntimeException in elementChanged",re); throw re; } catch ( Exception e) { LOG.error("Exception in elementChanged",e); ...
Method is called when an element has changed.
public void testAddEjbReferenceDescription() throws Exception { String xml="<weblogic-web-app>" + " <reference-descriptor>" + " </reference-descriptor>"+ "</weblogic-web-app>"; WeblogicXml descr=WeblogicXmlIo.parseWeblogicXml(new ByteArrayInputStream(xml.getBytes("UTF-8"))); EjbRef ref=new EjbRef(); ref.setNa...
Tests that a ejb reference description can be added
public static WebElement findElementVisibleAfter(SearchContext parent,By by,int timeoutInSeconds){ Preconditions.checkNotNull(parent); Preconditions.checkNotNull(by); try { WebElementWait wait=new WebElementWait(parent,timeoutInSeconds); return wait.until(null); } catch ( TimeoutException e) { thr...
Finds an element that is visible.
public static void main(final String[] args){ DOMTestCase.doMain(getElementById01.class,args); }
Runs this test from the command line.
public void deleteDashboard(BigInteger dashboardId) throws IOException { String requestUrl=RESOURCE + "/" + dashboardId.toString(); ArgusResponse response=getClient().executeHttpRequest(ArgusHttpClient.RequestType.DELETE,requestUrl,null); assertValidResponse(response,requestUrl); }
Deletes a dashboard.
public static byte[] createByteArray(int size,String data){ byte[] byteArray=new byte[size]; for (int i=0; i < size; i++) { byteArray[i]=Byte.parseByte(data,2); } return byteArray; }
Create a byte array with a specific size filled with specified data.
protected static Agent createAgent(int rtpPort) throws Throwable { return createAgent(rtpPort,false); }
Creates a vanilla ICE <tt>Agent</tt> and adds to it an audio and a video stream with RTP and RTCP components.
public static byte[] ivCipherConcat(byte[] iv,byte[] cipherText){ byte[] combined=new byte[iv.length + cipherText.length]; System.arraycopy(iv,0,combined,0,iv.length); System.arraycopy(cipherText,0,combined,iv.length,cipherText.length); return combined; }
Concatinate the IV to the cipherText using array copy. This is used e.g. before computing mac.
private void verifyNfsACLsAddList(List<NfsACE> addList,Set<String> userSet){ validateNfsAceSyntax(addList); for ( NfsACE ace : addList) { if (userSet.contains(ace.getUser())) { throw APIException.badRequests.nfsACLAlreadyExists("add",ace.getUser()); } } }
Verify the new ACE which need to be added exist in DB or not
private static By byFromLocator(String locator){ if (locator.startsWith("//")) { return By.xpath(locator); } if (locator.startsWith("id=")) { return By.id(locator.replaceFirst("id=","")); } if (locator.startsWith("css=")) { return By.cssSelector(locator.replaceFirst("css=","")); } if (locator....
Converts a locator string with a known prefix to a By object
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 Map<String,String> parseHeaders(Map<Integer,String> headers,Object[] args){ Map<String,String> newHeaders=new HashMap<>(); for ( Map.Entry<Integer,String> header : headers.entrySet()) { newHeaders.putIfAbsent((String)args[header.getKey()],header.getValue()); LOGGER.debug("Header key: " + head...
Parse headers annotation parameters
public Task<VcenterRestRep> create(VcenterCreateParam input,Boolean validateConnection,Boolean discoverVcenter){ UriBuilder uriBuilder=client.uriBuilder(baseUrl); if (validateConnection) { uriBuilder.queryParam(VALIDATE_CONNECTION_PARAM,Boolean.TRUE); } if (!discoverVcenter) { uriBuilder.queryParam(DISC...
Creates the vCenter. <p> API Call: <tt>POST /compute/vcenters/</tt>
public boolean isDynamic(){ return getSource().isDynamic(); }
Forward the call (blocking until source is set if need be).
public static void loadFontsFromJar(Object refObj,String[] fileNames){ GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] fontsListing=ge.getAllFonts(); InputStream inStream; Font checkFont; try { toNextFileName: for ( String fileName : fileNames) { checkFont=Fon...
<p> This utility method is designed to Load OpenType/TrueType fonts into the current Runtime Environment without installing them to the OS. It takes the base path of the refObj and loads font files located relative to it. It checks to make sure that the fonts are not already installed in the system OS, first. If th...
public void testConnection(BillingAdapter billingAdapter) throws BillingApplicationException { newBillingPluginProxy(billingAdapter).testConnection(); }
Test the connection to the external billing system via the billing adapter
private void pruneNonMatchedStreams(){ boolean prune=false; for ( IceMediaStream stream : getStreams()) { for ( Component component : stream.getComponents()) { if (component.getRemoteCandidateCount() > 0) prune=true; if (prune) break; } } if (prune) { for ( IceMediaStr...
<tt>Free()</tt>s and removes from this agent components or entire streams if they do not contain remote candidates. A possible reason for this could be the fact that the remote party canceled some of the streams or that it is using rtcp-mux or bundle.
protected void processReturnInsert(){ if (hasReturnInsert()) { getLogger().logWarningMessage(MetadataLogger.IGNORE_RETURN_INSERT_ANNOTATION,getAnnotatedElement()); } }
INTERNAL: Subclasses should call this method if they want the warning message or override the method if they want/support different behavior.
@Override public void onStartElement(String namespace,String localName,String prefix,Attributes attributes,DeserializationContext context) throws SAXException { if (value == null && constructorToUse == null) { try { value=javaType.newInstance(); } catch ( Exception e) { throw new SAXException(...
Set the bean properties that correspond to element attributes. This method is invoked after startElement when the element requires deserialization (i.e. the element is not an href and the value is not nil.)
public ObjectIdentifier(int[] oid,String name,Object oidGroup){ this(oid); if (oidGroup == null) { throw new NullPointerException("oidGroup == null"); } this.group=oidGroup; this.name=name; toOIDString(); }
Creates ObjectIdentifier(OID) from array of integers.
public static int[] distributeKeys(final int m,final int m2,final long nleaves,final long nentries){ if (m < Options.MIN_BRANCHING_FACTOR) throw new IllegalArgumentException(); if (m > Options.MAX_INDEX_SEGMENT_BRANCHING_FACTOR) throw new IllegalArgumentException(); if (m2 < (m + 1) / 2) throw new IllegalAr...
Distributes the keys among the leaves. <p> We want to fill up every leaf, but we have to make sure that the last leaf is not under capacity. To that end, we calculate the #of entries that would remain if we filled up n-1 leaves completely. If the #of remaining entries is less than or equal to the minimum capacity of a ...
public static Builder builder(InstallRequest request){ return new Builder(request); }
Returns an install request builder for an existing request.
YearMonthDay(YearMonthDay partial,Chronology chrono){ super(partial,chrono); }
Constructs a YearMonthDay with values from this instance and a new chronology.
public void createPictScenario10() throws Exception { BillingIntegrationTestBase.setDateFactoryInstance(DateTimeHandling.calculateMillis("2013-06-20 10:00:00")); String supplierAdminId="Pict10Supplier"; VOOrganization supplier=orgSetup.createOrganization(basicSetup.getPlatformOperatorUserKey(),supplierAdminId,"Pi...
See testcase #10 in BESBillingFactorCombinations.xlsx
protected void initBPOrderDetails(int C_BPartner_ID,boolean forInvoice){ log.config("C_BPartner_ID=" + C_BPartner_ID); KeyNamePair pp=new KeyNamePair(0,""); orderField.removeActionListener(this); orderField.removeAllItems(); orderField.addItem(pp); ArrayList<KeyNamePair> list=loadOrderData(C_BPartner_ID,for...
Load PBartner dependent Order/Invoice/Shipment Field.
public static void addDependency(Dependency depend){ ClassLoader loader=Thread.currentThread().getContextClassLoader(); addDependency(depend,loader); }
Adds a dependency to the current environment.
protected StringBuffer inlineValueSB(Environment env,Context ctx,StringBuffer buffer){ return right.inlineValueSB(env,ctx,buffer); }
Delegate to our subexpression. See the comment in AddExpression#inlineValueSB() for information about this method.
public void initialize(Body bodyA,Body bodyB,Vector2 anchor){ this.bodyA=bodyA; this.bodyB=bodyB; localAnchorA.set(bodyA.getLocalPoint(anchor)); localAnchorB.set(bodyB.getLocalPoint(anchor)); }
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.