public Object[] toArray() { return equality!=null && identity!=null ? (Object[]) SUtil.joinArrays(equality.toArray(), identity.toArray()) : equality!=null ? equality.toArray() : identity!=null ? identity.toArray() : new Object[0]; }
public Object[] toArray() { return equality!=null && identity!=null ? (Object[]) SUtil.joinArrays(equality.toArray(), identity.toArray()) : equality!=null ? equality.toArray() : identity!=null ? identity.toArray() : new Object[0]; }
public Object[] getPath() { return (Object[]) SUtil.joinArrays(((AbstractInspectorNode)super.parent).getPath(), new Object[]{this}); }
public Object[] getPath() { return (Object[]) SUtil.joinArrays(((AbstractInspectorNode)super.parent).getPath(), new Object[]{this}); }
/** * Get the values as array. * @param type The component type of the array. * @return The array of values. */ public Object[] getObjects(Class<?> type) { Object ret = Array.newInstance(type, 0); for(Iterator<K> i=map.keySet().iterator(); i.hasNext(); ) { ret = SUtil.joinArrays(ret, get(i.next()).toArray()); } return (Object[])ret; }
/** * Get the path of this node (inclusive) starting from the root node. */ public Object[] getPath() { if(path==null) { if(parent!=null) { path = (Object[])SUtil.joinArrays(parent.getPath(), new Object[]{this}); } else { path = new Object[]{this}; } } return path; }
/** * Get the path of this node (inclusive) starting from the root node. */ public Object[] getPath() { if(path==null) { if(parent instanceof AttributeNode) { path = (Object[])SUtil.joinArrays(((AttributeNode)parent).getPath(), new Object[]{this}); } else { path = new Object[]{parent, this}; } } return path; }
/** * Get the path of this node (inclusive) starting from the root node. */ public Object[] getPath() { if(path==null) { if(parent!=null) { path = (Object[])SUtil.joinArrays(((ObjectInspectorNode)parent).getPath(), new Object[]{this}); } else { path = new Object[]{this}; } } return path; }
/** * Get the path of this node (inclusive) starting from the root node. */ public Object[] getPath() { if(path==null) { if(parent!=null) { path = (Object[])SUtil.joinArrays(((ObjectInspectorNode)parent).getPath(), new Object[]{this}); } else { path = new Object[]{this}; } } return path; }
/** * Build the digest given the timestamp and password. */ public static byte[] buildDigest(long timestamp, String secret) { // System.out.println("build digest: "+timestamp+" "+secret); try { MessageDigest md = MessageDigest.getInstance("SHA-384"); byte[] input = (byte[])SUtil.joinArrays(secret.getBytes(), SUtil.longToBytes(timestamp)); byte[] output = md.digest(input); return output; } catch(NoSuchAlgorithmException e) { // Shouldn't happen? throw new RuntimeException(e); } }
/** * Get meta infos about a percept type. */ protected String[][] getMetaInfos(String percepttype) { if(percepttypes==null) { this.percepttypes = new HashMap(); Object[] percepttypes = getPerceptTypes(); for(int i=0; i<percepttypes.length; i++) { String[] per = (String[])percepttypes[i]; String[][] newmis = per.length==3 ? new String[][]{{per[1], per[2]}} : new String[][]{{per[1], per[2], per[3]}}; String[][] oldmis = (String[][])this.percepttypes.get(per[0]); if(oldmis!=null) newmis = (String[][])SUtil.joinArrays(oldmis, newmis); this.percepttypes.put(per[0], newmis); } } return (String[][])percepttypes.get(percepttype); }
/** * Get meta infos about a percept type. */ protected String[][] getMetaInfos(String percepttype) { if(percepttypes==null) { this.percepttypes = new HashMap(); Object[] percepttypes = getPerceptTypes(); for(int i=0; i<percepttypes.length; i++) { String[] per = (String[])percepttypes[i]; String[][] newmis = per.length==3 ? new String[][]{{per[1], per[2]}} : new String[][]{{per[1], per[2], per[3]}}; String[][] oldmis = (String[][])this.percepttypes.get(per[0]); if(oldmis!=null) newmis = (String[][])SUtil.joinArrays(oldmis, newmis); this.percepttypes.put(per[0], newmis); } } return (String[][])percepttypes.get(percepttype); }
/** * Get meta infos about a percept type. */ protected String[][] getMetaInfos(String percepttype) { if(percepttypes==null) { this.percepttypes = new HashMap<String, String[][]>(); Object[] percepttypes = getPerceptTypes(); for(int i=0; i<percepttypes.length; i++) { String[] per = (String[])percepttypes[i]; String[][] newmis = per.length==3 ? new String[][]{{per[1], per[2]}} : new String[][]{{per[1], per[2], per[3]}}; String[][] oldmis = (String[][])this.percepttypes.get(per[0]); if(oldmis!=null) newmis = (String[][])SUtil.joinArrays(oldmis, newmis); this.percepttypes.put(per[0], newmis); } } return (String[][])percepttypes.get(percepttype); }
/** * Build the digest given the timestamp and password. */ public static byte[] buildDigest(long timestamp, String secret) { // System.out.println("build digest: "+timestamp+" "+secret); byte[] input = (byte[])SUtil.joinArrays(secret.getBytes(), SUtil.longToBytes(timestamp)); return buildDigest(input); }
/** * Build the digest given the timestamp and password. */ public static byte[] buildDigest(long timestamp, String secret) { // System.out.println("build digest: "+timestamp+" "+secret); byte[] input = (byte[])SUtil.joinArrays(secret.getBytes(), SUtil.longToBytes(timestamp)); return buildDigest(input); }
/** * Get the path of this node (inclusive) starting from the root node. */ public Object[] getPath() { if(path==null) { if (parent != null) { if(parent instanceof ObjectInspectorAttributeNode) { path = (Object[])SUtil.joinArrays(((ObjectInspectorAttributeNode)parent).getPath(), new Object[]{this}); } else { path = new Object[]{parent, this}; } } else { path = new Object[]{this}; } } return path; }
path = (Object[])SUtil.joinArrays(((AttributeNode)parent).getPath(), new Object[]{this}); path = (Object[])SUtil.joinArrays(((ObjectInspectorAttributeNode)parent).getPath(), new Object[]{this});
/** * Get all popup actions (also from supertypes). * @return The popup actions. */ public Action[] getPopupActions() { Action[] all = (Action[])actions.toArray(new Action[actions.size()]); if(supertype!=null) { all = (Action[])SUtil.joinArrays(supertype.getPopupActions(), all); } List ret = SCollection.createArrayList(); for(int i=0; i<all.length; i++) { if(all[i].isEnabled()) { //System.out.println("Enabled: "+all[i]); ret.add(all[i]); } } return (Action[])ret.toArray(new Action[ret.size()]); }
for(long time=0; time<100000; time++) byte[] input = (byte[])SUtil.joinArrays(pw.getBytes(), SUtil.longToBytes(time)); input = (byte[])SUtil.joinArrays(input, cidbytes); byte[] output = md.digest(input); if(runs==0 && (time==0 || time==1))
/** * Get unbound parameter nodes. * @return The unbound parameter nodes. */ public ParameterNode[] getUnboundParameterNodes() { // Default: Return unbound parameters of subnodes. ParameterNode[] ret = new ParameterNode[0]; for(int i=0; i<jjtGetNumChildren(); i++) { ret = (ParameterNode[])SUtil.joinArrays(ret, ((ExpressionNode)jjtGetChild(i)).getUnboundParameterNodes()); } return ret; }