@Override public boolean equals(Object obj) { if (obj instanceof CharSequence) { return Pipe.isEqual(pipe, (CharSequence)obj, meta, len); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof CharSequence) { return Pipe.isEqual(pipe, (CharSequence)obj, meta, len); } return false; }
@Override public boolean equals(Object obj) { if (obj instanceof CharSequence) { return Pipe.isEqual(pipe, (CharSequence)obj, meta, len); } return false; }
public static boolean capturedFieldBytesEquals(TrieParserReader reader, int idx, byte[] target, int targetPos, int targetMask) { int pos = idx*4; assert(pos < reader.capturedValues.length) : "Either the idx argument is too large or TrieParseReader was not constructed to hold this many fields"; int type = reader.capturedValues[pos++]; assert(type==0); int p = reader.capturedValues[pos++]; int l = reader.capturedValues[pos++]; int m = reader.capturedValues[pos++]; if (l<=target.length) { return Pipe.isEqual(reader.capturedBlobArray, p, m, target, targetPos, targetMask, l); } else { return false; } }
public static boolean capturedFieldBytesEquals(TrieParserReader reader, int idx, byte[] target, int targetPos, int targetMask) { int pos = idx*4; assert(pos < reader.capturedValues.length) : "Either the idx argument is too large or TrieParseReader was not constructed to hold this many fields"; int type = reader.capturedValues[pos++]; assert(type==0); int p = reader.capturedValues[pos++]; int l = reader.capturedValues[pos++]; int m = reader.capturedValues[pos++]; if (l<=target.length) { return Pipe.isEqual(reader.capturedBlobArray, p, m, target, targetPos, targetMask, l); } else { return false; } }
public static boolean capturedFieldBytesEquals(TrieParserReader reader, int idx, byte[] target, int targetPos, int targetMask) { int pos = idx*4; assert(pos < reader.capturedValues.length) : "Either the idx argument is too large or TrieParseReader was not constructed to hold this many fields"; int type = reader.capturedValues[pos++]; assert(type==0); int p = reader.capturedValues[pos++]; int l = reader.capturedValues[pos++]; int m = reader.capturedValues[pos++]; if (l<=target.length) { return Pipe.isEqual(reader.capturedBlobArray, p, m, target, targetPos, targetMask, l); } else { return false; } }
/** * Checks specified pipe to see if charSeq and value at specific location are equal * @param pipe pipe to be checked * @param loc location of value to compare * @param charSeq CharSequence to compare * @return <code>true</code> if the values are equal else <code>false</code> */ public static boolean isEqual(Pipe pipe, int loc, CharSequence charSeq) { int pos = Pipe.slab(pipe)[pipe.slabMask & (int)(pipe.ringWalker.activeReadFragmentStack[STACK_OFF_MASK&(loc>>STACK_OFF_SHIFT)] + (OFF_MASK&loc))]; return Pipe.isEqual(pipe, charSeq, pos, PipeReader.readBytesLength(pipe,loc)); }
/** * Checks specified pipe to see if charSeq and value at specific location are equal * @param pipe pipe to be checked * @param loc location of value to compare * @param charSeq CharSequence to compare * @return <code>true</code> if the values are equal else <code>false</code> */ public static boolean isEqual(Pipe pipe, int loc, CharSequence charSeq) { int pos = Pipe.slab(pipe)[pipe.slabMask & (int)(pipe.ringWalker.activeReadFragmentStack[STACK_OFF_MASK&(loc>>STACK_OFF_SHIFT)] + (OFF_MASK&loc))]; return Pipe.isEqual(pipe, charSeq, pos, PipeReader.readBytesLength(pipe,loc)); }
/** * Checks specified pipe to see if charSeq and value at specific location are equal * @param pipe pipe to be checked * @param loc location of value to compare * @param charSeq CharSequence to compare * @return <code>true</code> if the values are equal else <code>false</code> */ public static boolean isEqual(Pipe pipe, int loc, CharSequence charSeq) { int pos = Pipe.slab(pipe)[pipe.slabMask & (int)(pipe.ringWalker.activeReadFragmentStack[STACK_OFF_MASK&(loc>>STACK_OFF_SHIFT)] + (OFF_MASK&loc))]; return Pipe.isEqual(pipe, charSeq, pos, PipeReader.readBytesLength(pipe,loc)); }
isEqual &= Pipe.isEqual(input, expected, expectedPos, meta, len); expectedPos += len;