private Item intern(Item item) {
   if (item.sameSymbol(ANY.getSymbol())) return ANY;
   if (item.sameSymbol(VAR.getSymbol())) return VAR;
   if (item.sameSymbol(TERM.getSymbol())) return TERM;
   if (item.sameSymbol(URI.getSymbol())) return URI;
   if (item.sameSymbol(LITERAL.getSymbol())) return LITERAL;
   if (item.sameSymbol(BNODE.getSymbol())) return BNODE;
   return item;
 }
Exemplo n.º 2
0
 @Override
 protected A_Type privateBlockTypeRestriction() {
   return FunctionTypeDescriptor.create(
       TupleDescriptor.from(
           ATOM.o(),
           MapTypeDescriptor.mapTypeForSizesKeyTypeValueType(
               IntegerRangeTypeDescriptor.inclusive(
                   IntegerDescriptor.zero(), IntegerDescriptor.fromInt(socketOptions.length - 1)),
               IntegerRangeTypeDescriptor.inclusive(
                   IntegerDescriptor.one(), IntegerDescriptor.fromInt(socketOptions.length - 1)),
               ANY.o())),
       TOP.o());
 }
 public Template() {
   seqt = new SEQUENCE.Template();
   seqt.addElement(ANY.getTemplate());
   seqt.addElement(INTEGER.getTemplate());
 }
Exemplo n.º 4
0
 @Override
 protected A_Type privateBlockTypeRestriction() {
   return FunctionTypeDescriptor.create(
       TupleDescriptor.from(ANY.o()),
       TupleTypeDescriptor.oneOrMoreOf(IntegerRangeTypeDescriptor.bytes()));
 }
Exemplo n.º 5
0
 /** @see org.apache.james.jdkim.api.PublicKeyRecord#getAcceptableHashMethods() */
 public List<CharSequence> getAcceptableHashMethods() {
   if (ANY.equals(getValue("h"))) return null;
   return stringToColonSeparatedList(getValue("h").toString(), hyphenatedWordPattern);
 }