code
stringlengths
10
174k
nl
stringlengths
3
129k
public InputFieldDialog(final String LABEL_KEY){ this(I18n.tr("Input"),LABEL_KEY); }
Constructs an input field with a generic caption and a specialized label for the field.
private char readChar() throws IOException { int x=readByte() & 0xff; if (x < 0x80) { return (char)x; } else if (x >= 0xe0) { return (char)(((x & 0xf) << 12) + ((readByte() & 0x3f) << 6) + (readByte() & 0x3f)); } else { return (char)(((x & 0x1f) << 6) + (readByte() & 0x3f)); } }
Read one character from the input stream.
public boolean readBoundary() throws IOException { byte[] marker=new byte[2]; boolean nextChunk=false; head+=boundaryLength; marker[0]=readByte(); if (marker[0] == LF) { return true; } marker[1]=readByte(); if (arrayequals(marker,STREAM_TERMINATOR,2)) { nextChunk=false; } else if (arrayequa...
Skips a <code>boundary</code> token, and checks whether more <code>encapsulations</code> are contained in the stream.
public void generatePotentialMenuTimes(TimeIncrement timeIncrement,LocalTime optionalStartTime,LocalTime optionalEndTime){ LocalTime startTime=(optionalStartTime == null) ? LocalTime.MIN : optionalStartTime; LocalTime endTime=(optionalEndTime == null) ? LocalTime.MAX : optionalEndTime; potentialMenuTimes=new Arra...
generatePotentialMenuTimes, This will generate a list of menu times for populating the combo box menu, using a TimePickerSettings.TimeIncrement value. The menu times will always start at Midnight, and increase according to the increment until the last time before 11:59pm. Note: This function can be called before or aft...
@Override public void updateFinished(){ determineNumberOfClusters(); }
Singals the end of the updating.
private static void renumProviders(){ Provider[] p=Services.getProviders(); for (int i=0; i < p.length; i++) { p[i].setProviderNumber(i + 1); } }
Update sequence numbers of all providers.
public boolean isOk(){ return this.ok; }
isOk: Get validation state
public void sessionDestroyed(HttpSessionEvent event){ String nativeId=event.getSession().getId(); try { String sessionId=SessionCachingFilter.getSessionManager().destroyNativeSession(nativeId); LOG.debug("Received sessionDestroyed event for native session {} (wrapped by {})",nativeId,sessionId); } catch ...
This will receive events from the container using the native sessions.
public boolean isNfsMountCreationRequired(){ return nfsMountCreationRequired; }
Gets the value of the nfsMountCreationRequired property.
public void addFillOutsideLine(FillOutsideLine fill){ mFillBelowLine.add(fill); }
Sets if the line chart should be filled outside its line. Filling outside with FillOutsideLine.INTEGRAL the line transforms a line chart into an area chart.
public void requestAutoFocus(Handler handler,int message){ if (camera != null && previewing) { autoFocusCallback.setHandler(handler,message); camera.autoFocus(autoFocusCallback); } }
Asks the camera hardware to perform an autofocus.
public static ComponentRelationshipBuilder component(String componentName){ return new ComponentRelationshipBuilder(componentName); }
Create a ComponentRelationshipBuilder.
public static final String format(ReadOnlyVector3 vec){ if (vec == null) { return (""); } return (String.format(Landscape.stringFormat,vec.getX()) + "," + String.format(Landscape.stringFormat,vec.getY())+ ","+ String.format(Landscape.stringFormat,vec.getZ())); }
Format a Vector3.
void sendMessage(ChannelData channelData,TransportAddress srcAddr,TransportAddress remoteAddr) throws IllegalArgumentException, IOException, StunException { boolean pad=srcAddr.getTransport() == Transport.TCP || srcAddr.getTransport() == Transport.TLS; sendMessage(channelData.encode(pad),srcAddr,remoteAddr); }
Sends the specified stun message through the specified access point.
public static LazyPStackX<Integer> range(int start,int end){ return fromStreamS(ReactiveSeq.range(start,end)); }
Create a LazyPStackX that contains the Integers between start and end
public UnchangeableAllowingOnBehalfActingException(String message,ApplicationExceptionBean bean,Throwable cause){ super(message,bean,cause); }
Constructs a new exception with the specified detail message, cause, and bean for JAX-WS exception serialization.
public static Complex conjugate(Complex c){ return new Complex(c.real,-c.imag); }
Conjugates a complex number.
public JRadioButtonMenuItem(String text,boolean selected){ this(text); setSelected(selected); }
Creates a radio button menu item with the specified text and selection state.
private static void appendNamedParameter(StringBuffer sb,String name,Object value){ if (value != null) { sb.append(name).append("=\"").append(value).append("\" "); } }
Appends the name and the value of an Object to a StringBuffer.
public void addValue(String key,BigDecimal val,String comment) throws HeaderCardException { addHeaderCard(key,new HeaderCard(key,val,comment)); }
Add or replace a key with the given bigdecimal value and comment. Note that float values will be promoted to doubles.
public static void clearCache(){ initCache(); m_Cache.clear(); }
clears the cache for class/classnames queries.
@Override public final boolean hasStableIds(){ return true; }
Adapter must have stable id
public static Element createElementInEncryptionSpace(Document doc,String elementName){ if (doc == null) { throw new RuntimeException("Document is null"); } if ((xencPrefix == null) || (xencPrefix.length() == 0)) { return doc.createElementNS(EncryptionConstants.EncryptionSpecNS,elementName); } return d...
Creates an Element in the XML Encryption specification namespace.
public int calcColumnWidth(int col){ return calcColumnWidth(getJTable(),col); }
calcs the optimal column width of the given column
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { return m_arg0.execute(xctxt).bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE; }
Execute the function. The function must return a valid object.
public static boolean isControlCharacter(char c){ return c < 32 || c == 127; }
Checks if a particular character is a control character, in Lanterna this currently means it's 0-31 or 127 in the ascii table.
@SuppressWarnings("unchecked") public T withResult(Object result){ response.result=result; return (T)this; }
Sets the operation response result.
public static String convertExchangeShortNameToClassname(String shortExchangeName){ if (BITSTAMP_EXCHANGE_NAME.equalsIgnoreCase(shortExchangeName)) { return BitstampExchange.class.getName(); } else if (BTCE_EXCHANGE_NAME.equalsIgnoreCase(shortExchangeName)) { return BTCEExchange.class.getName(); } els...
Convert an exchange short name into a classname that can be used to create an Exchange.
public SQLNonTransientConnectionException(String reason,String sqlState,Throwable cause){ super(reason,sqlState,cause); }
Creates an SQLNonTransientConnectionException object. The Reason string is set to the given reason string, the SQLState string is set to the given SQLState string and the cause Throwable object is set to the given cause Throwable object.
private void tryScrollBackToTopAbortRefresh(){ tryScrollBackToTop(); }
just make easier to understand
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:30.780 -0500",hash_original_method="373B413D23312B4F586E9709CD9454D3",hash_generated_method="4885D96B2E3A8FE3ADAF1F0D12C568CC") private static String displayNameFor(int off){...
Provides the name of the algorithmic time zone for the specified offset. Taken from TimeZone.java.
public static Integer evictionPolicyMaxSize(@Nullable EvictionPolicy plc){ if (plc instanceof LruEvictionPolicyMBean) return ((LruEvictionPolicyMBean)plc).getMaxSize(); if (plc instanceof RandomEvictionPolicyMBean) return ((RandomEvictionPolicyMBean)plc).getMaxSize(); if (plc instanceof FifoEvictionPolicyMBea...
Extract max size from eviction policy if available.
public void fillInInvokerStackTrace(){ getCause().setStackTrace(Thread.currentThread().getStackTrace()); }
We were created in a thread that is not related to the remote that called the method. This allows us to see the stack trace of the invoker.
public String pullRequestsUrl(String account,String collection,String repoId){ Objects.requireNonNull(repoId,"Repository id required"); return getTeamBaseUrl(account,collection) + format(PULL_REQUESTS,repoId) + getApiVersion(); }
Returns the url for pull requests.
@Override public synchronized boolean equals(Object object){ if (this == object) { return true; } if (object instanceof List) { List<?> list=(List<?>)object; if (list.size() != elementCount) { return false; } int index=0; Iterator<?> it=list.iterator(); while (it.hasNext()) { ...
Compares the specified object to this vector and returns if they are equal. The object must be a List which contains the same objects in the same order.
private void processAnsiCommandCharacter(char ansiCommandCharacter){ switch (ansiCommandCharacter) { case '@': processAnsiCommand_atsign(); break; case 'A': processAnsiCommand_A(); break; case 'B': processAnsiCommand_B(); break; case 'C': processAnsiCommand_C(); break; case 'D': processAnsiCommand_D(); break; cas...
This method dispatches control to various processing methods based on the command character found in the most recently received ANSI escape sequence. This method only handles command characters that follow the ANSI standard Control Sequence Introducer (CSI), which is "\e[...", where "..." is an optional ';'-separated s...
private JSONWriter append(String string) throws JSONException { if (string == null) { throw new JSONException("Null pointer"); } if (this.mode == 'o' || this.mode == 'a') { try { if (this.comma && this.mode == 'a') { this.writer.write(','); } this.writer.write(string); } cat...
Append a value.
public DatagramReader(final byte[] byteArray){ byteStream=new ByteArrayInputStream(Arrays.copyOf(byteArray,byteArray.length)); currentByte=0; currentBitIndex=-1; }
Creates a new reader for an array of bytes.
public synchronized Stream<Map.Entry<ID,Type>> stream(){ return registered.entrySet().stream(); }
Return the stream of the underlying Registrar hashmap. Use this to directly manipulate the registrar
public void simulateMethod(SootMethod method,ReferenceVariable thisVar,ReferenceVariable returnVar,ReferenceVariable params[]){ String subSignature=method.getSubSignature(); { defaultMethod(method,thisVar,returnVar,params); return; } }
Implements the abstract method simulateMethod. It distributes the request to the corresponding methods by signatures.
protected int availableIDsSize(){ return this.idsAvailable.size(); }
Caller must hold the rwLock
public void list(){ Iterator<String> iter=lastNames.iterator(); while (iter.hasNext()) { System.out.println(iter.next()); } System.out.println(); iter=doubleLastNames.iterator(); while (iter.hasNext()) { System.out.println(iter.next()); } System.out.println(); iter=firstNames.iterator(); whi...
A function for debugging, list out all the recorded name character
MutableBigInteger divideKnuth(MutableBigInteger b,MutableBigInteger quotient,boolean needRemainder){ if (b.intLen == 0) throw new ArithmeticException("BigInteger divide by zero"); if (intLen == 0) { quotient.intLen=quotient.offset=0; return needRemainder ? new MutableBigInteger() : null; } int cmp=com...
Calculates the quotient of this div b and places the quotient in the provided MutableBigInteger objects and the remainder object is returned. Uses Algorithm D in Knuth section 4.3.1. Many optimizations to that algorithm have been adapted from the Colin Plumb C library. It special cases one word divisors for speed. The ...
public void applyComponentOrientation(ComponentOrientation o){ possiblyFixCursor(o.isLeftToRight()); super.applyComponentOrientation(o); }
Overridden to ensure that the cursor for this component is appropriate for the orientation.
public RandomBallCoverOneShot(List<V> vecs,DistanceMetric dm,int s,ExecutorService execServ){ this.dm=dm; this.s=s; this.allVecs=new ArrayList<V>(vecs); if (execServ instanceof FakeExecutor) distCache=dm.getAccelerationCache(allVecs); else distCache=dm.getAccelerationCache(vecs,execServ); IntList allIndi...
Creates a new one-shot version of the Random Cover Ball.
public static Bitmap createThumbnailBitmap(Context context,Uri mediaUri,int maxThumbWidth,int maxThumbHeight){ Bitmap thumbnailBitmap=null; ResourceUtils.Resource resource=ResourceUtils.openResource(context,mediaUri,null); if (null == resource) { return null; } try { BitmapFactory.Options options=new ...
Creates a thumbnail bitmap from a media Uri
public OsmoseBug(){ open(); }
Used for when parsing API output
@Override public String toString(){ return this.name; }
Returns a string representing the object.
public Swagger2MarkupConfig build(){ buildNaturalOrdering(); return config; }
Builds the Swagger2MarkupConfig.
public void moveTo(int x,int y){ Rectangle r=getBounds(); translate(x - r.x,y - r.y); }
Sets bounding box of all elements in group at (x, y)
public boolean submitNoWake(Runnable task){ ClassLoader loader=Thread.currentThread().getContextClassLoader(); boolean isPriority=false; boolean isQueue=true; boolean isWake=false; return scheduleImpl(task,loader,MAX_EXPIRE,isPriority,isQueue,isWake); }
Submit a task, but do not wake the scheduler
private void updateMenu(){ this.removeAll(); for ( WorkspaceComponent component : workspace.getComponentList()) { JMenu componentMenu=new JMenu(component.getName()); for ( PotentialConsumer potentialConsumer : component.getPotentialConsumers()) { if (potentialConsumer.getDataType() == producer.get...
Update the menu to reflect current configuration of components in the workspace.
@Override public int doStartTag() throws JspException { i=0; return EVAL_BODY_BUFFERED; }
Process start tag
@DSSpec(DSCat.IO) @DSSource({DSSourceKind.IO}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:52.765 -0400",hash_original_method="C68A979C97C9773BF4E1D97780D466BC",hash_generated_method="ABED2FB5692629886742AFEF5BC17E85") public void readFully(byte[] data,int offset,int length) ...
Invokes the delegate's <code>read(byte[] data, int, int)</code> method.
public void focusLost(FocusEvent e){ ((FocusListener)a).focusLost(e); ((FocusListener)b).focusLost(e); }
Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.
@Override protected EClass eStaticClass(){ return EipPackage.Literals.ROUTE; }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected void basicCheck(Environment env) throws ClassNotFound { if (tracing) env.dtEnter("BinaryClass.basicCheck: " + getName()); if (basicChecking || basicCheckDone) { if (tracing) env.dtExit("BinaryClass.basicCheck: OK " + getName()); return; } if (tracing) env.dtEvent("BinaryClass.basicChec...
Ready a BinaryClass for further checking. Note that, until recently, BinaryClass relied on the default basicCheck() provided by ClassDefinition. The definition here has been added to ensure that the information generated by collectInheritedMethods is available for BinaryClasses.
public AnnotationFS add(AnnotationFS aOriginFs,AnnotationFS aTargetFs,JCas aJCas,int aStart,int aEnd,AnnotationFeature aFeature,Object aLabelValue) throws BratAnnotationException { if (crossMultipleSentence || isSameSentence(aJCas,aOriginFs.getBegin(),aTargetFs.getEnd())) { return interalAddToCas(aJCas,aStart,aEn...
Update the CAS with new/modification of arc annotations from brat
public long size(){ long size=0; for (int x=0; x < trees.length; x++) size+=trees[x].child.numNodes(GPNode.NODESEARCH_ALL); return size; }
Returns the "size" of the individual, namely, the number of nodes in all of its subtrees.
public ApplicationExceptionBean(ApplicationExceptionBean template){ setId(template.getId()); setCauseStackTrace(template.getCauseStackTrace()); setMessageKey(template.getMessageKey()); setMessageParams(template.getMessageParams()); }
Instantiates an <code>ApplicationExceptionBean</code> based on the specified template. The exception ID, causing stack trace, message key, and message parameters are copied from the template.
private static Node createNode(final Graph2D graph2D,final INaviViewNode node){ if (node instanceof INaviGroupNode) { return ((INaviGroupNode)node).isCollapsed() ? graph2D.getHierarchyManager().createFolderNode(graph2D) : graph2D.getHierarchyManager().createGroupNode(graph2D); } else { return graph2D.creat...
Creates a new yfiles graph node.
public void addPrefix(String prefix,String uri){ namespaces.put(prefix,uri); this.prefix.put(uri,prefix); }
Add a namespace prefix and namespace name to context.
@Override public void test() throws ParameterException { if (!list.isDefined() || !length.isDefined()) { return; } if (list.size() != length.intValue()) { throw new WrongParameterValueException("Global Parameter Constraint Error." + "\nThe size of the list parameter \"" + list.getName() + "\" must be "+ l...
Checks is the size of the list parameter is equal to the constraint list size specified. If not, a parameter exception is thrown.
public InlineQueryResultVoice.InlineQueryResultVoiceBuilder title(String title){ this.title=title; return this; }
*Required Sets the title to the provided value
private List<DiffEntry> commitToCommit(String commitAId,String commitBId,DiffFormatter formatter) throws IOException { if (commitAId == null) { commitAId=Constants.HEAD; } ObjectId commitA=repository.resolve(commitAId); if (commitA == null) { throw new IllegalArgumentException("Invalid commit id " + com...
Show changes between specified two revisions and index. If <code>commitAId == null</code> then view changes between HEAD and revision commitBId.
@Override public void writeBatch() throws IOException { if (getInstances() == null) { throw new IOException("No instances to save"); } if (getRetrieval() == INCREMENTAL) { throw new IOException("Batch and incremental saving cannot be mixed."); } setRetrieval(BATCH); setWriteMode(WRITE); if ((retri...
Writes a Batch of instances.
public void loadLocal(final int local){ loadInsn(getLocalType(local),local); }
Generates the instruction to load the given local variable on the stack.
private void testArrayAndOther(OverloadedMethodsSubset oms){ assertEquals(Serializable.class,oms.getCommonSupertypeForUnwrappingHint(int[].class,String.class)); assertEquals(Serializable.class,oms.getCommonSupertypeForUnwrappingHint(Object[].class,String.class)); assertEquals(Object.class,oms.getCommonSupertypeFo...
These will be the same with fixed and buggy:
private void addNewAccessor(final ITypeBinding type,final IVariableBinding field,final String contents,final ListRewrite rewrite,final ASTNode insertion){ final String delimiter=StubUtility.getLineDelimiterUsed(); final MethodDeclaration declaration=(MethodDeclaration)rewrite.getASTRewrite().createStringPlaceholder...
Adds a new accessor for the specified field.
public Rectangle2D createProperBounds(double x1,double y1,double x2,double y2){ double x=Math.min(x1,x2); double y=Math.min(y1,y2); double w=Math.abs(x1 - x2); double h=Math.abs(y1 - y2); return new Rectangle2D.Double(x,y,w,h); }
Create a bounding rectangle given the four coordinates, where the upper left corner of the rectangle is the minimum x, y values and the width and height are the difference between xs and ys.
public void revert(){ orientation=orientation == RIGHT ? LEFT : RIGHT; }
Reverts the orientation
PrefixExpression(AST ast){ super(ast); }
Creates a new AST node for an prefix expression owned by the given AST. By default, the node has unspecified (but legal) operator and operand.
static int svd_imin(int a,int b){ return Math.min(a,b); }
returns the smaller of two integers
public ColladaAccessor(String ns){ super(ns); }
Create a new accessor.
public synchronized int lastIndexOf(Object object,int location){ if (location < elementCount) { if (object != null) { for (int i=location; i >= 0; i--) { if (object.equals(elementData[i])) { return i; } } } else { for (int i=location; i >= 0; i--) { if (ele...
Searches in this vector for the index of the specified object. The search for the object starts at the specified location and moves towards the start of this vector.
public static synchronized X509CertImpl intern(X509Certificate c) throws CertificateException { if (c == null) { return null; } boolean isImpl=c instanceof X509CertImpl; byte[] encoding; if (isImpl) { encoding=((X509CertImpl)c).getEncodedInternal(); } else { encoding=c.getEncoded(); } X509C...
Return an interned X509CertImpl for the given certificate. If the given X509Certificate or X509CertImpl is already present in the cert cache, the cached object is returned. Otherwise, if it is a X509Certificate, it is first converted to a X509CertImpl. Then the X509CertImpl is added to the cache and returned. Note that...
protected void checkSlice(int slice){ if (slice < 0 || slice >= slices) throw new IndexOutOfBoundsException("Attempted to access " + toStringShort() + " at slice="+ slice); }
Sanity check for operations requiring a slice index to be within bounds.
public static float rotateX(float pX,float pY,float cX,float cY,float angleInDegrees){ double angle=Math.toRadians(angleInDegrees); return (float)(Math.cos(angle) * (pX - cX) - Math.sin(angle) * (pY - cY) + cX); }
Rotate point P around center point C.
private BaseToken fetchTokenLocal(TokenOnWire tw){ BaseToken verificationToken=null; URI tkId=tw.getTokenId(); if (!tw.isProxyToken()) { verificationToken=_dbClient.queryObject(Token.class,tkId); if (null != verificationToken && !checkExpiration(((Token)verificationToken),true)) { _log.warn("Token f...
Retrieves a token and checks expiration
public SignatureVisitor visitSuperclass(){ return this; }
Visits the type of the super class.
public byte byteValue(){ return toNumber().byteValue(); }
Returns the value of the specified Variant as a <code>byte</code>. This may involve rounding or truncation.
public static EqualityExpression eq(String propertyName,Object value){ return new EqualityExpression(Operator.EQUAL,propertyName,value); }
Apply an "equal" constraint to the named property
public CtClass makeNestedClass(String name,boolean isStatic){ throw new RuntimeException(getName() + " is not a class"); }
Makes a new public nested class. If this method is called, the <code>CtClass</code>, which encloses the nested class, is modified since a class file includes a list of nested classes. <p>The current implementation only supports a static nested class. <code>isStatic</code> must be true.
public int processBlock(byte[] in,int inOff,byte[] out,int outOff) throws DataLengthException, IllegalStateException { return (encrypting) ? encryptBlock(in,inOff,out,outOff) : decryptBlock(in,inOff,out,outOff); }
Process one block of input from the array in and write it to the out array.
public boolean containsProperly(Geometry g){ if (!baseGeom.getEnvelopeInternal().contains(g.getEnvelopeInternal())) return false; return baseGeom.relate(g,"T**FF*FF*"); }
Default implementation.
public AbstractLocalContainerStub(){ }
Allows creating a container with no configuration for test that do not require a configuration.
public GlowInventoryView(HumanEntity player,Inventory top){ this(player,top.getType(),top,player.getInventory()); }
Create an inventory view for this player looking at a given top inventory.
public NotificationChain basicSetReturnTypeRef(TypeRef newReturnTypeRef,NotificationChain msgs){ TypeRef oldReturnTypeRef=returnTypeRef; returnTypeRef=newReturnTypeRef; if (eNotificationRequired()) { ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,TypesPackage.TFUNCTION__RETURN_TYPE...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void navigateToHome(Context context){ if (context != null) { context.startActivity(new Intent(context,HomeActivity.class)); } }
Goes to the user details screen.
public void readExif(String inFileName) throws FileNotFoundException, IOException { if (inFileName == null) { throw new IllegalArgumentException(NULL_ARGUMENT_STRING); } InputStream is=null; try { is=(InputStream)new BufferedInputStream(new FileInputStream(inFileName)); readExif(is); } catch ( I...
Reads the exif tags from a file, clearing this ExifInterface object's existing exif tags.
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response){ processGetRequest(request,response); }
Handles the HTTP <code>POST</code> method.
public DOTGenerator(Grammar grammar){ this.grammar=grammar; }
This aspect is associated with a grammar
private void checkSenderStillAlive(PartitionedRegion r,InternalDistributedMember sender){ if (!r.getDistributionAdvisor().containsId(sender)) { r.getRedundancyProvider().finishIncompleteBucketCreation(this.bucketId); } }
Check that sender is still a participant in the partitioned region. If not, notify other nodes to create backup buckets
public synchronized long ensureThreadId(){ if (DEBUG || DELETEDEBUG) { LogTag.debug("ensureThreadId before: " + mThreadId); } if (mThreadId <= 0) { mThreadId=getOrCreateThreadId(mContext,mRecipients); } if (DEBUG || DELETEDEBUG) { LogTag.debug("ensureThreadId after: " + mThreadId); } return mT...
Guarantees that the conversation has been created in the database. This will make a blocking database call if it hasn't.
private void initActions(){ getActionMap().put(UndoAction.ID,undo.getUndoAction()); getActionMap().put(RedoAction.ID,undo.getRedoAction()); }
Initializes view specific actions.
public static byte[] calculateAgreement(byte[] ourPrivate,byte[] theirPublic){ byte[] agreement=new byte[32]; scalarmult.crypto_scalarmult(agreement,ourPrivate,theirPublic); return agreement; }
Calculating DH agreement
public void testConstrIntMathContext(){ int a=732546982; int precision=21; RoundingMode rm=RoundingMode.CEILING; MathContext mc=new MathContext(precision,rm); String res="732546982"; int resScale=0; BigDecimal result=new BigDecimal(a,mc); assertEquals("incorrect value",res,result.unscaledValue().toStrin...
new BigDecimal(int, MathContext)
public boolean isVlanOverrideAllowed(){ return vlanOverrideAllowed; }
Gets the value of the vlanOverrideAllowed property.
public SilentExit(){ this(1); }
SilentExit with default exit code 1.
public static String join(boolean[] self,String separator){ StringBuilder buffer=new StringBuilder(); boolean first=true; if (separator == null) separator=""; for ( boolean next : self) { if (first) { first=false; } else { buffer.append(separator); } buffer.append(next); } re...
Concatenates the string representation of each items in this array, with the given String as a separator between each item.