/** * depricated Use the new constructor instead. * * @param hashCode x * @param annos x * @param _value x */ @Deprecated protected void init(final int hashCode, final int value) { super.init(hashCode); _value = value; }
@Override public List<Object> match(final ATerm pattern) { final List<Object> list = new LinkedList<>(); if (match(pattern, list)) return list; return null; }
@Override public void writeToTextFile(final OutputStream stream) throws IOException { writeToTextFile(new ATermWriter(stream)); }
@Override public List<Object> match(final String pattern) { return match(_factory.parsePattern(pattern)); }
/** * depricated Use the new constructor instead. * * @param hashCode x * @param annos x * @param data x */ @Deprecated protected void init(final int hashCode, final byte[] data) { super.init(hashCode); _data = data; }
@Override public void writeToSharedTextFile(final OutputStream stream) throws IOException { final ATermWriter writer = new ATermWriter(stream); writer.initializeSharing(); stream.write('!'); writeToTextFile(writer); }
@Override protected boolean match(final ATerm pattern, final List<Object> list) { if (equals(pattern)) return true; if (pattern.getType() == ATerm.PLACEHOLDER) { final ATerm type = ((ATermPlaceholder) pattern).getPlaceholder(); if (type.getType() == ATerm.APPL) { final ATermAppl appl = (ATermAppl) type; final AFun afun = appl.getAFun(); if (afun.getName().equals("real") && afun.getArity() == 0 && !afun.isQuoted()) { list.add(new Double(_value)); return true; } } } return super.match(pattern, list); }
/** * depricated Use the new constructor instead. * * @param hashCode x * @param annos x * @param value x */ @Deprecated protected void init(final int hashCode, final long value) { super.init(hashCode); _value = value; }
@Override public String toString() { try { final OutputStream stream = new ByteArrayOutputStream(); final ATermWriter writer = new ATermWriter(stream); writeToTextFile(writer); return stream.toString(); } catch (final IOException e) { throw new OpenError("IOException: " + e.getMessage()); } }
@Override protected boolean match(final ATerm pattern, final List<Object> list) { if (equals(pattern)) return true; if (pattern.getType() == ATerm.PLACEHOLDER) { final ATerm type = ((ATermPlaceholder) pattern).getPlaceholder(); if (type.getType() == ATerm.APPL) { final ATermAppl appl = (ATermAppl) type; final AFun afun = appl.getAFun(); if (afun.getName().equals("int") && afun.getArity() == 0 && !afun.isQuoted()) { list.add(new Integer(_value)); return true; } } } return super.match(pattern, list); }
/** * depricated Use the new constructor instead. * * @param hashCode x * @param annos x * @param value x */ @Deprecated protected void init(final int hashCode, final double value) { super.init(hashCode); _value = value; }
@Override protected boolean match(final ATerm pattern, final List<Object> list) { if (equals(pattern)) return true; if (pattern.getType() == ATerm.PLACEHOLDER) { final ATerm type = ((ATermPlaceholder) pattern).getPlaceholder(); if (type.getType() == ATerm.APPL) { final ATermAppl appl = (ATermAppl) type; final AFun afun = appl.getAFun(); if (afun.getName().equals("long") && afun.getArity() == 0 && !afun.isQuoted()) { list.add(new Long(_value)); return true; } } } return super.match(pattern, list); }
protected void init(final int hashCode, final ATerm first, final ATermList next) { super.init(hashCode); _first = first; _next = next; if (first == null && next == null) _length = 0; else _length = 1 + next.getLength(); }
@Override public boolean match(final ATerm pattern, final List<Object> list) { if (pattern.getType() == ATerm.PLACEHOLDER) { final ATerm t = ((ATermPlaceholder) pattern).getPlaceholder(); if (t.getType() == ATerm.APPL) { final ATermAppl appl = (ATermAppl) t; final AFun afun = appl.getAFun(); if (afun.getName().equals("placeholder") && afun.getArity() == 0 && !afun.isQuoted()) { list.add(t); return true; } } } return super.match(pattern, list); }
@Override protected boolean match(final ATerm pattern, final List<Object> list) { if (equals(pattern)) return true; if (pattern.getType() == ATerm.PLACEHOLDER) { final ATerm type = ((ATermPlaceholder) pattern).getPlaceholder(); if (type.getType() == ATerm.APPL) { final ATermAppl appl = (ATermAppl) type; final AFun afun = appl.getAFun(); if (afun.getName().equals("blob") && afun.getArity() == 0 && !afun.isQuoted()) { list.add(_data); return true; } } } return super.match(pattern, list); }
return super.match(pattern, list);
return super.match(pattern, list);