0001: /*
0002: * Primitive Collections for Java.
0003: * Copyright (C) 2002, 2003 Søren Bak
0004: *
0005: * This library is free software; you can redistribute it and/or
0006: * modify it under the terms of the GNU Lesser General Public
0007: * License as published by the Free Software Foundation; either
0008: * version 2.1 of the License, or (at your option) any later version.
0009: *
0010: * This library is distributed in the hope that it will be useful,
0011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0013: * Lesser General Public License for more details.
0014: *
0015: * You should have received a copy of the GNU Lesser General Public
0016: * License along with this library; if not, write to the Free Software
0017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0018: */
0019: package bak.pcj;
0020:
0021: import bak.pcj.list.*;
0022: import bak.pcj.set.*;
0023: import bak.pcj.map.*;
0024: import bak.pcj.adapter.*;
0025: import java.util.Collection;
0026: import java.util.Iterator;
0027: import java.util.List;
0028: import java.util.ListIterator;
0029: import java.util.Set;
0030: import java.util.SortedSet;
0031: import java.util.Map;
0032:
0033: /**
0034: * This class provides static methods for creating adapters betweeen
0035: * primitive collections and Java Collection Framework collections.
0036: * Adapters are generally implemented as wrappers around an underlying
0037: * collection. Thus, changes to the underlying collection are reflected
0038: * by the adapting collection and vice versa.
0039: *
0040: * <p>In order for adaptions from JCF to PCJ to work correctly,
0041: * a number of rules should be followed:
0042: * <ul>
0043: * <li>The underlying java.util collection/iterator should only
0044: * contain values of the class representing the primitive type
0045: * of the adapting collection/iterator. E.g. if a <tt>List</tt> is adapted
0046: * to a <tt>FloatCollection</tt>, the <tt>List</tt> can only contain
0047: * values of class <tt>Float</tt>. If this rule is not followed, a
0048: * {@link ClassCastException ClassCastException} will likely be
0049: * thrown by some or all of the adaption's methods.
0050: * <li>The underlying java.util collection/iterator should not
0051: * contain <tt>null</tt>-values. If this rule is not followed, a
0052: * {@link NullPointerException NullPointerException} will likely be
0053: * thrown by some or all of the adaption's methods.
0054: * </ul>
0055: * The adapter classes from JCF to PCJ all contains validation methods
0056: * to ensure that these rules are followed, and a number of static methods
0057: * is available in this class to check whether a JCF collection is
0058: * adaptable (<tt>isTAdaptable(Collection)</tt>, <tt>isTKeyAdaptable(Map)</tt>,
0059: * and <tt>isTKeySAdaptable(Map)</tt>).
0060: *
0061: * @author Søren Bak
0062: * @version 1.3 18-08-2003 23:53
0063: * @since 1.0
0064: */
0065: public class Adapter {
0066:
0067: /** Prevents instantiation. */
0068: private Adapter() {
0069: }
0070:
0071: // ---------------------------------------------------------------
0072: // Iterator -> TIterator
0073: // ---------------------------------------------------------------
0074:
0075: /**
0076: * Returns an adaption of an iterator to an iterator over
0077: * primitive boolean values.
0078: *
0079: * @param iterator
0080: * the iterator to adapt.
0081: *
0082: * @return an adaption of an iterator to an iterator over
0083: * primitive boolean values.
0084: */
0085: public static BooleanIterator asBooleans(Iterator iterator) {
0086: return new IteratorToBooleanIteratorAdapter(iterator);
0087: }
0088:
0089: /**
0090: * Returns an adaption of an iterator to an iterator over
0091: * primitive char values.
0092: *
0093: * @return an adaption of an iterator to an iterator over
0094: * primitive char values.
0095: */
0096: public static CharIterator asChars(Iterator iterator) {
0097: return new IteratorToCharIteratorAdapter(iterator);
0098: }
0099:
0100: /**
0101: * Returns an adaption of an iterator to an iterator over
0102: * primitive byte values.
0103: *
0104: * @param iterator
0105: * the iterator to adapt.
0106: *
0107: * @return an adaption of an iterator to an iterator over
0108: * primitive byte values.
0109: */
0110: public static ByteIterator asBytes(Iterator iterator) {
0111: return new IteratorToByteIteratorAdapter(iterator);
0112: }
0113:
0114: /**
0115: * Returns an adaption of an iterator to an iterator over
0116: * primitive short values.
0117: *
0118: * @param iterator
0119: * the iterator to adapt.
0120: *
0121: * @return an adaption of an iterator to an iterator over
0122: * primitive short values.
0123: */
0124: public static ShortIterator asShorts(Iterator iterator) {
0125: return new IteratorToShortIteratorAdapter(iterator);
0126: }
0127:
0128: /**
0129: * Returns an adaption of an iterator to an iterator over
0130: * primitive int values.
0131: *
0132: * @param iterator
0133: * the iterator to adapt.
0134: *
0135: * @return an adaption of an iterator to an iterator over
0136: * primitive int values.
0137: */
0138: public static IntIterator asInts(Iterator iterator) {
0139: return new IteratorToIntIteratorAdapter(iterator);
0140: }
0141:
0142: /**
0143: * Returns an adaption of an iterator to an iterator over
0144: * primitive long values.
0145: *
0146: * @param iterator
0147: * the iterator to adapt.
0148: *
0149: * @return an adaption of an iterator to an iterator over
0150: * primitive long values.
0151: */
0152: public static LongIterator asLongs(Iterator iterator) {
0153: return new IteratorToLongIteratorAdapter(iterator);
0154: }
0155:
0156: /**
0157: * Returns an adaption of an iterator to an iterator over
0158: * primitive float values.
0159: *
0160: * @param iterator
0161: * the iterator to adapt.
0162: *
0163: * @return an adaption of an iterator to an iterator over
0164: * primitive float values.
0165: */
0166: public static FloatIterator asFloats(Iterator iterator) {
0167: return new IteratorToFloatIteratorAdapter(iterator);
0168: }
0169:
0170: /**
0171: * Returns an adaption of an iterator to an iterator over
0172: * primitive double values.
0173: *
0174: * @param iterator
0175: * the iterator to adapt.
0176: *
0177: * @return an adaption of an iterator to an iterator over
0178: * primitive double values.
0179: */
0180: public static DoubleIterator asDoubles(Iterator iterator) {
0181: return new IteratorToDoubleIteratorAdapter(iterator);
0182: }
0183:
0184: // ---------------------------------------------------------------
0185: // TIterator -> Iterator
0186: // ---------------------------------------------------------------
0187:
0188: /**
0189: * Returns an adaption of an iterator over primitive
0190: * boolean values to an iterator.
0191: *
0192: * @param iterator
0193: * the iterator to adapt.
0194: *
0195: * @return an adaption of an iterator over primitive
0196: * boolean values to an iterator.
0197: */
0198: public static Iterator asObjects(BooleanIterator iterator) {
0199: return new BooleanIteratorToIteratorAdapter(iterator);
0200: }
0201:
0202: /**
0203: * Returns an adaption of an iterator over primitive
0204: * char values to an iterator.
0205: *
0206: * @param iterator
0207: * the iterator to adapt.
0208: *
0209: * @return an adaption of an iterator over primitive
0210: * char values to an iterator.
0211: */
0212: public static Iterator asObjects(CharIterator iterator) {
0213: return new CharIteratorToIteratorAdapter(iterator);
0214: }
0215:
0216: /**
0217: * Returns an adaption of an iterator over primitive
0218: * byte values to an iterator.
0219: *
0220: * @param iterator
0221: * the iterator to adapt.
0222: *
0223: * @return an adaption of an iterator over primitive
0224: * byte values to an iterator.
0225: */
0226: public static Iterator asObjects(ByteIterator iterator) {
0227: return new ByteIteratorToIteratorAdapter(iterator);
0228: }
0229:
0230: /**
0231: * Returns an adaption of an iterator over primitive
0232: * short values to an iterator.
0233: *
0234: * @param iterator
0235: * the iterator to adapt.
0236: *
0237: * @return an adaption of an iterator over primitive
0238: * short values to an iterator.
0239: */
0240: public static Iterator asObjects(ShortIterator iterator) {
0241: return new ShortIteratorToIteratorAdapter(iterator);
0242: }
0243:
0244: /**
0245: * Returns an adaption of an iterator over primitive
0246: * int values to an iterator.
0247: *
0248: * @param iterator
0249: * the iterator to adapt.
0250: *
0251: * @return an adaption of an iterator over primitive
0252: * int values to an iterator.
0253: */
0254: public static Iterator asObjects(IntIterator iterator) {
0255: return new IntIteratorToIteratorAdapter(iterator);
0256: }
0257:
0258: /**
0259: * Returns an adaption of an iterator over primitive
0260: * long values to an iterator.
0261: *
0262: * @param iterator
0263: * the iterator to adapt.
0264: *
0265: * @return an adaption of an iterator over primitive
0266: * long values to an iterator.
0267: */
0268: public static Iterator asObjects(LongIterator iterator) {
0269: return new LongIteratorToIteratorAdapter(iterator);
0270: }
0271:
0272: /**
0273: * Returns an adaption of an iterator over primitive
0274: * float values to an iterator.
0275: *
0276: * @param iterator
0277: * the iterator to adapt.
0278: *
0279: * @return an adaption of an iterator over primitive
0280: * float values to an iterator.
0281: */
0282: public static Iterator asObjects(FloatIterator iterator) {
0283: return new FloatIteratorToIteratorAdapter(iterator);
0284: }
0285:
0286: /**
0287: * Returns an adaption of an iterator over primitive
0288: * double values to an iterator.
0289: *
0290: * @param iterator
0291: * the iterator to adapt.
0292: *
0293: * @return an adaption of an iterator over primitive
0294: * double values to an iterator.
0295: */
0296: public static Iterator asObjects(DoubleIterator iterator) {
0297: return new DoubleIteratorToIteratorAdapter(iterator);
0298: }
0299:
0300: // ---------------------------------------------------------------
0301: // Collection -> TCollection
0302: // ---------------------------------------------------------------
0303:
0304: /**
0305: * Returns an adaption of a collection to a collection of
0306: * primitive boolean values.
0307: *
0308: * @param collection
0309: * the collection to adapt.
0310: *
0311: * @return an adaption of a collection to a collection of
0312: * primitive boolean values.
0313: */
0314: public static BooleanCollection asBooleans(Collection collection) {
0315: return new CollectionToBooleanCollectionAdapter(collection);
0316: }
0317:
0318: /**
0319: * Returns an adaption of a collection to a collection of
0320: * primitive char values.
0321: *
0322: * @param collection
0323: * the collection to adapt.
0324: *
0325: * @return an adaption of a collection to a collection of
0326: * primitive char values.
0327: */
0328: public static CharCollection asChars(Collection collection) {
0329: return new CollectionToCharCollectionAdapter(collection);
0330: }
0331:
0332: /**
0333: * Returns an adaption of a collection to a collection of
0334: * primitive byte values.
0335: *
0336: * @param collection
0337: * the collection to adapt.
0338: *
0339: * @return an adaption of a collection to a collection of
0340: * primitive byte values.
0341: */
0342: public static ByteCollection asBytes(Collection collection) {
0343: return new CollectionToByteCollectionAdapter(collection);
0344: }
0345:
0346: /**
0347: * Returns an adaption of a collection to a collection of
0348: * primitive short values.
0349: *
0350: * @param collection
0351: * the collection to adapt.
0352: *
0353: * @return an adaption of a collection to a collection of
0354: * primitive short values.
0355: */
0356: public static ShortCollection asShorts(Collection collection) {
0357: return new CollectionToShortCollectionAdapter(collection);
0358: }
0359:
0360: /**
0361: * Returns an adaption of a collection to a collection of
0362: * primitive int values.
0363: *
0364: * @param collection
0365: * the collection to adapt.
0366: *
0367: * @return an adaption of a collection to a collection of
0368: * primitive int values.
0369: */
0370: public static IntCollection asInts(Collection collection) {
0371: return new CollectionToIntCollectionAdapter(collection);
0372: }
0373:
0374: /**
0375: * Returns an adaption of a collection to a collection of
0376: * primitive long values.
0377: *
0378: * @param collection
0379: * the collection to adapt.
0380: *
0381: * @return an adaption of a collection to a collection of
0382: * primitive long values.
0383: */
0384: public static LongCollection asLongs(Collection collection) {
0385: return new CollectionToLongCollectionAdapter(collection);
0386: }
0387:
0388: /**
0389: * Returns an adaption of a collection to a collection of
0390: * primitive float values.
0391: *
0392: * @param collection
0393: * the collection to adapt.
0394: *
0395: * @return an adaption of a collection to a collection of
0396: * primitive float values.
0397: */
0398: public static FloatCollection asFloats(Collection collection) {
0399: return new CollectionToFloatCollectionAdapter(collection);
0400: }
0401:
0402: /**
0403: * Returns an adaption of a collection to a collection of
0404: * primitive double values.
0405: *
0406: * @param collection
0407: * the collection to adapt.
0408: *
0409: * @return an adaption of a collection to a collection of
0410: * primitive double values.
0411: */
0412: public static DoubleCollection asDoubles(Collection collection) {
0413: return new CollectionToDoubleCollectionAdapter(collection);
0414: }
0415:
0416: // ---------------------------------------------------------------
0417: // TCollection -> Collection
0418: // ---------------------------------------------------------------
0419:
0420: /**
0421: * Returns an adaption of a primitive collection of boolean values
0422: * to a collection.
0423: *
0424: * @param collection
0425: * the collection to adapt.
0426: *
0427: * @return an adaption of a primitive collection of boolean
0428: * values to a collection.
0429: */
0430: public static Collection asObjects(BooleanCollection collection) {
0431: return new BooleanCollectionToCollectionAdapter(collection);
0432: }
0433:
0434: /**
0435: * Returns an adaption of a primitive collection of char values
0436: * to a collection.
0437: *
0438: * @param collection
0439: * the collection to adapt.
0440: *
0441: * @return an adaption of a primitive collection of char
0442: * values to a collection.
0443: */
0444: public static Collection asObjects(CharCollection collection) {
0445: return new CharCollectionToCollectionAdapter(collection);
0446: }
0447:
0448: /**
0449: * Returns an adaption of a primitive collection of byte values
0450: * to a collection.
0451: *
0452: * @param collection
0453: * the collection to adapt.
0454: *
0455: * @return an adaption of a primitive collection of byte
0456: * values to a collection.
0457: */
0458: public static Collection asObjects(ByteCollection collection) {
0459: return new ByteCollectionToCollectionAdapter(collection);
0460: }
0461:
0462: /**
0463: * Returns an adaption of a primitive collection of short values
0464: * to a collection.
0465: *
0466: * @param collection
0467: * the collection to adapt.
0468: *
0469: * @return an adaption of a primitive collection of short
0470: * values to a collection.
0471: */
0472: public static Collection asObjects(ShortCollection collection) {
0473: return new ShortCollectionToCollectionAdapter(collection);
0474: }
0475:
0476: /**
0477: * Returns an adaption of a primitive collection of int values
0478: * to a collection.
0479: *
0480: * @param collection
0481: * the collection to adapt.
0482: *
0483: * @return an adaption of a primitive collection of int
0484: * values to a collection.
0485: */
0486: public static Collection asObjects(IntCollection collection) {
0487: return new IntCollectionToCollectionAdapter(collection);
0488: }
0489:
0490: /**
0491: * Returns an adaption of a primitive collection of long values
0492: * to a collection.
0493: *
0494: * @param collection
0495: * the collection to adapt.
0496: *
0497: * @return an adaption of a primitive collection of long
0498: * values to a collection.
0499: */
0500: public static Collection asObjects(LongCollection collection) {
0501: return new LongCollectionToCollectionAdapter(collection);
0502: }
0503:
0504: /**
0505: * Returns an adaption of a primitive collection of float values
0506: * to a collection.
0507: *
0508: * @param collection
0509: * the collection to adapt.
0510: *
0511: * @return an adaption of a primitive collection of float
0512: * values to a collection.
0513: */
0514: public static Collection asObjects(FloatCollection collection) {
0515: return new FloatCollectionToCollectionAdapter(collection);
0516: }
0517:
0518: /**
0519: * Returns an adaption of a primitive collection of double values
0520: * to a collection.
0521: *
0522: * @param collection
0523: * the collection to adapt.
0524: *
0525: * @return an adaption of a primitive collection of double
0526: * values to a collection.
0527: */
0528: public static Collection asObjects(DoubleCollection collection) {
0529: return new DoubleCollectionToCollectionAdapter(collection);
0530: }
0531:
0532: // ---------------------------------------------------------------
0533: // ListIterator -> TListIterator
0534: // ---------------------------------------------------------------
0535:
0536: /**
0537: * Returns an adaption of a list iterator to a list iterator over
0538: * primitive boolean values.
0539: *
0540: * @param iterator
0541: * the list iterator to adapt.
0542: *
0543: * @return an adaption of a list iterator to a list iterator over
0544: * primitive boolean values.
0545: */
0546: public static BooleanListIterator asBooleans(ListIterator iterator) {
0547: return new ListIteratorToBooleanListIteratorAdapter(iterator);
0548: }
0549:
0550: /**
0551: * Returns an adaption of a list iterator to a list iterator over
0552: * primitive char values.
0553: *
0554: * @param iterator
0555: * the list iterator to adapt.
0556: *
0557: * @return an adaption of a list iterator to a list iterator over
0558: * primitive char values.
0559: */
0560: public static CharListIterator asChars(ListIterator iterator) {
0561: return new ListIteratorToCharListIteratorAdapter(iterator);
0562: }
0563:
0564: /**
0565: * Returns an adaption of a list iterator to a list iterator over
0566: * primitive byte values.
0567: *
0568: * @param iterator
0569: * the list iterator to adapt.
0570: *
0571: * @return an adaption of a list iterator to a list iterator over
0572: * primitive byte values.
0573: */
0574: public static ByteListIterator asBytes(ListIterator iterator) {
0575: return new ListIteratorToByteListIteratorAdapter(iterator);
0576: }
0577:
0578: /**
0579: * Returns an adaption of a list iterator to a list iterator over
0580: * primitive short values.
0581: *
0582: * @param iterator
0583: * the list iterator to adapt.
0584: *
0585: * @return an adaption of a list iterator to a list iterator over
0586: * primitive short values.
0587: */
0588: public static ShortListIterator asShorts(ListIterator iterator) {
0589: return new ListIteratorToShortListIteratorAdapter(iterator);
0590: }
0591:
0592: /**
0593: * Returns an adaption of a list iterator to a list iterator over
0594: * primitive int values.
0595: *
0596: * @param iterator
0597: * the list iterator to adapt.
0598: *
0599: * @return an adaption of a list iterator to a list iterator over
0600: * primitive int values.
0601: */
0602: public static IntListIterator asInts(ListIterator iterator) {
0603: return new ListIteratorToIntListIteratorAdapter(iterator);
0604: }
0605:
0606: /**
0607: * Returns an adaption of a list iterator to a list iterator over
0608: * primitive long values.
0609: *
0610: * @param iterator
0611: * the list iterator to adapt.
0612: *
0613: * @return an adaption of a list iterator to a list iterator over
0614: * primitive long values.
0615: */
0616: public static LongListIterator asLongs(ListIterator iterator) {
0617: return new ListIteratorToLongListIteratorAdapter(iterator);
0618: }
0619:
0620: /**
0621: * Returns an adaption of a list iterator to a list iterator over
0622: * primitive float values.
0623: *
0624: * @param iterator
0625: * the list iterator to adapt.
0626: *
0627: * @return an adaption of a list iterator to a list iterator over
0628: * primitive float values.
0629: */
0630: public static FloatListIterator asFloats(ListIterator iterator) {
0631: return new ListIteratorToFloatListIteratorAdapter(iterator);
0632: }
0633:
0634: /**
0635: * Returns an adaption of a list iterator to a list iterator over
0636: * primitive double values.
0637: *
0638: * @param iterator
0639: * the list iterator to adapt.
0640: *
0641: * @return an adaption of a list iterator to a list iterator over
0642: * primitive double values.
0643: */
0644: public static DoubleListIterator asDoubles(ListIterator iterator) {
0645: return new ListIteratorToDoubleListIteratorAdapter(iterator);
0646: }
0647:
0648: // ---------------------------------------------------------------
0649: // TListIterator -> ListIterator
0650: // ---------------------------------------------------------------
0651:
0652: /**
0653: * Returns an adaption of a list iterator over
0654: * primitive boolean values to a list iterator.
0655: *
0656: * @param iterator
0657: * the list iterator to adapt.
0658: *
0659: * @return an adaption of a list iterator over
0660: * primitive boolean values to a list iterator.
0661: */
0662: public static ListIterator asObjects(BooleanListIterator iterator) {
0663: return new BooleanListIteratorToListIteratorAdapter(iterator);
0664: }
0665:
0666: /**
0667: * Returns an adaption of a list iterator over
0668: * primitive char values to a list iterator.
0669: *
0670: * @param iterator
0671: * the list iterator to adapt.
0672: *
0673: * @return an adaption of a list iterator over
0674: * primitive char values to a list iterator.
0675: */
0676: public static ListIterator asObjects(CharListIterator iterator) {
0677: return new CharListIteratorToListIteratorAdapter(iterator);
0678: }
0679:
0680: /**
0681: * Returns an adaption of a list iterator over
0682: * primitive byte values to a list iterator.
0683: *
0684: * @param iterator
0685: * the list iterator to adapt.
0686: *
0687: * @return an adaption of a list iterator over
0688: * primitive byte values to a list iterator.
0689: */
0690: public static ListIterator asObjects(ByteListIterator iterator) {
0691: return new ByteListIteratorToListIteratorAdapter(iterator);
0692: }
0693:
0694: /**
0695: * Returns an adaption of a list iterator over
0696: * primitive short values to a list iterator.
0697: *
0698: * @param iterator
0699: * the list iterator to adapt.
0700: *
0701: * @return an adaption of a list iterator over
0702: * primitive short values to a list iterator.
0703: */
0704: public static ListIterator asObjects(ShortListIterator iterator) {
0705: return new ShortListIteratorToListIteratorAdapter(iterator);
0706: }
0707:
0708: /**
0709: * Returns an adaption of a list iterator over
0710: * primitive int values to a list iterator.
0711: *
0712: * @param iterator
0713: * the list iterator to adapt.
0714: *
0715: * @return an adaption of a list iterator over
0716: * primitive int values to a list iterator.
0717: */
0718: public static ListIterator asObjects(IntListIterator iterator) {
0719: return new IntListIteratorToListIteratorAdapter(iterator);
0720: }
0721:
0722: /**
0723: * Returns an adaption of a list iterator over
0724: * primitive long values to a list iterator.
0725: *
0726: * @param iterator
0727: * the list iterator to adapt.
0728: *
0729: * @return an adaption of a list iterator over
0730: * primitive long values to a list iterator.
0731: */
0732: public static ListIterator asObjects(LongListIterator iterator) {
0733: return new LongListIteratorToListIteratorAdapter(iterator);
0734: }
0735:
0736: /**
0737: * Returns an adaption of a list iterator over
0738: * primitive float values to a list iterator.
0739: *
0740: * @param iterator
0741: * the list iterator to adapt.
0742: *
0743: * @return an adaption of a list iterator over
0744: * primitive float values to a list iterator.
0745: */
0746: public static ListIterator asObjects(FloatListIterator iterator) {
0747: return new FloatListIteratorToListIteratorAdapter(iterator);
0748: }
0749:
0750: /**
0751: * Returns an adaption of a list iterator over
0752: * primitive double values to a list iterator.
0753: *
0754: * @param iterator
0755: * the list iterator to adapt.
0756: *
0757: * @return an adaption of a list iterator over
0758: * primitive double values to a list iterator.
0759: */
0760: public static ListIterator asObjects(DoubleListIterator iterator) {
0761: return new DoubleListIteratorToListIteratorAdapter(iterator);
0762: }
0763:
0764: // ---------------------------------------------------------------
0765: // Set -> TSet
0766: // ---------------------------------------------------------------
0767:
0768: /**
0769: * Returns an adaption of a set to a set of
0770: * primitive boolean values.
0771: *
0772: * @param set
0773: * the set to adapt.
0774: *
0775: * @return an adaption of a set to a set of
0776: * primitive boolean values.
0777: */
0778: public static BooleanSet asBooleans(Set set) {
0779: return new SetToBooleanSetAdapter(set);
0780: }
0781:
0782: /**
0783: * Returns an adaption of a set to a set of
0784: * primitive char values.
0785: *
0786: * @param set
0787: * the set to adapt.
0788: *
0789: * @return an adaption of a set to a set of
0790: * primitive char values.
0791: */
0792: public static CharSet asChars(Set set) {
0793: return new SetToCharSetAdapter(set);
0794: }
0795:
0796: /**
0797: * Returns an adaption of a set to a set of
0798: * primitive byte values.
0799: *
0800: * @param set
0801: * the set to adapt.
0802: *
0803: * @return an adaption of a set to a set of
0804: * primitive byte values.
0805: */
0806: public static ByteSet asBytes(Set set) {
0807: return new SetToByteSetAdapter(set);
0808: }
0809:
0810: /**
0811: * Returns an adaption of a set to a set of
0812: * primitive short values.
0813: *
0814: * @param set
0815: * the set to adapt.
0816: *
0817: * @return an adaption of a set to a set of
0818: * primitive short values.
0819: */
0820: public static ShortSet asShorts(Set set) {
0821: return new SetToShortSetAdapter(set);
0822: }
0823:
0824: /**
0825: * Returns an adaption of a set to a set of
0826: * primitive int values.
0827: *
0828: * @param set
0829: * the set to adapt.
0830: *
0831: * @return an adaption of a set to a set of
0832: * primitive int values.
0833: */
0834: public static IntSet asInts(Set set) {
0835: return new SetToIntSetAdapter(set);
0836: }
0837:
0838: /**
0839: * Returns an adaption of a set to a set of
0840: * primitive long values.
0841: *
0842: * @param set
0843: * the set to adapt.
0844: *
0845: * @return an adaption of a set to a set of
0846: * primitive long values.
0847: */
0848: public static LongSet asLongs(Set set) {
0849: return new SetToLongSetAdapter(set);
0850: }
0851:
0852: /**
0853: * Returns an adaption of a set to a set of
0854: * primitive float values.
0855: *
0856: * @param set
0857: * the set to adapt.
0858: *
0859: * @return an adaption of a set to a set of
0860: * primitive float values.
0861: */
0862: public static FloatSet asFloats(Set set) {
0863: return new SetToFloatSetAdapter(set);
0864: }
0865:
0866: /**
0867: * Returns an adaption of a set to a set of
0868: * primitive double values.
0869: *
0870: * @param set
0871: * the set to adapt.
0872: *
0873: * @return an adaption of a set to a set of
0874: * primitive double values.
0875: */
0876: public static DoubleSet asDoubles(Set set) {
0877: return new SetToDoubleSetAdapter(set);
0878: }
0879:
0880: // ---------------------------------------------------------------
0881: // TSet -> Set
0882: // ---------------------------------------------------------------
0883:
0884: /**
0885: * Returns an adaption of a set of primitive boolean values
0886: * to a set.
0887: *
0888: * @param set
0889: * the set to adapt.
0890: *
0891: * @return an adaption of a set of primitive boolean values
0892: * to a set.
0893: */
0894: public static Set asObjects(BooleanSet set) {
0895: return new BooleanSetToSetAdapter(set);
0896: }
0897:
0898: /**
0899: * Returns an adaption of a set of primitive char values
0900: * to a set.
0901: *
0902: * @param set
0903: * the set to adapt.
0904: *
0905: * @return an adaption of a set of primitive char values
0906: * to a set.
0907: */
0908: public static Set asObjects(CharSet set) {
0909: return new CharSetToSetAdapter(set);
0910: }
0911:
0912: /**
0913: * Returns an adaption of a set of primitive byte values
0914: * to a set.
0915: *
0916: * @param set
0917: * the set to adapt.
0918: *
0919: * @return an adaption of a set of primitive byte values
0920: * to a set.
0921: */
0922: public static Set asObjects(ByteSet set) {
0923: return new ByteSetToSetAdapter(set);
0924: }
0925:
0926: /**
0927: * Returns an adaption of a set of primitive short values
0928: * to a set.
0929: *
0930: * @param set
0931: * the set to adapt.
0932: *
0933: * @return an adaption of a set of primitive short values
0934: * to a set.
0935: */
0936: public static Set asObjects(ShortSet set) {
0937: return new ShortSetToSetAdapter(set);
0938: }
0939:
0940: /**
0941: * Returns an adaption of a set of primitive int values
0942: * to a set.
0943: *
0944: * @param set
0945: * the set to adapt.
0946: *
0947: * @return an adaption of a set of primitive int values
0948: * to a set.
0949: */
0950: public static Set asObjects(IntSet set) {
0951: return new IntSetToSetAdapter(set);
0952: }
0953:
0954: /**
0955: * Returns an adaption of a set of primitive long values
0956: * to a set.
0957: *
0958: * @param set
0959: * the set to adapt.
0960: *
0961: * @return an adaption of a set of primitive long values
0962: * to a set.
0963: */
0964: public static Set asObjects(LongSet set) {
0965: return new LongSetToSetAdapter(set);
0966: }
0967:
0968: /**
0969: * Returns an adaption of a set of primitive float values
0970: * to a set.
0971: *
0972: * @param set
0973: * the set to adapt.
0974: *
0975: * @return an adaption of a set of primitive float values
0976: * to a set.
0977: */
0978: public static Set asObjects(FloatSet set) {
0979: return new FloatSetToSetAdapter(set);
0980: }
0981:
0982: /**
0983: * Returns an adaption of a set of primitive double values
0984: * to a set.
0985: *
0986: * @param set
0987: * the set to adapt.
0988: *
0989: * @return an adaption of a set of primitive double values
0990: * to a set.
0991: */
0992: public static Set asObjects(DoubleSet set) {
0993: return new DoubleSetToSetAdapter(set);
0994: }
0995:
0996: // ---------------------------------------------------------------
0997: // SortedSet -> TSortedSet
0998: // ---------------------------------------------------------------
0999:
1000: /**
1001: * Returns an adaption of a sorted set to a sorted set of
1002: * primitive boolean values.
1003: *
1004: * @param set
1005: * the set to adapt.
1006: *
1007: * @return an adaption of a set to a set of
1008: * primitive boolean values.
1009: *
1010: * @since 1.2
1011: */
1012: public static BooleanSortedSet asBooleans(SortedSet set) {
1013: return new SortedSetToBooleanSortedSetAdapter(set);
1014: }
1015:
1016: /**
1017: * Returns an adaption of a sorted set to a sorted set of
1018: * primitive char values.
1019: *
1020: * @param set
1021: * the set to adapt.
1022: *
1023: * @return an adaption of a set to a set of
1024: * primitive char values.
1025: *
1026: * @since 1.2
1027: */
1028: public static CharSortedSet asChars(SortedSet set) {
1029: return new SortedSetToCharSortedSetAdapter(set);
1030: }
1031:
1032: /**
1033: * Returns an adaption of a sorted set to a sorted set of
1034: * primitive byte values.
1035: *
1036: * @param set
1037: * the set to adapt.
1038: *
1039: * @return an adaption of a set to a set of
1040: * primitive byte values.
1041: *
1042: * @since 1.2
1043: */
1044: public static ByteSortedSet asBytes(SortedSet set) {
1045: return new SortedSetToByteSortedSetAdapter(set);
1046: }
1047:
1048: /**
1049: * Returns an adaption of a sorted set to a sorted set of
1050: * primitive short values.
1051: *
1052: * @param set
1053: * the set to adapt.
1054: *
1055: * @return an adaption of a set to a set of
1056: * primitive short values.
1057: *
1058: * @since 1.2
1059: */
1060: public static ShortSortedSet asShorts(SortedSet set) {
1061: return new SortedSetToShortSortedSetAdapter(set);
1062: }
1063:
1064: /**
1065: * Returns an adaption of a sorted set to a sorted set of
1066: * primitive int values.
1067: *
1068: * @param set
1069: * the set to adapt.
1070: *
1071: * @return an adaption of a set to a set of
1072: * primitive int values.
1073: *
1074: * @since 1.2
1075: */
1076: public static IntSortedSet asInts(SortedSet set) {
1077: return new SortedSetToIntSortedSetAdapter(set);
1078: }
1079:
1080: /**
1081: * Returns an adaption of a sorted set to a sorted set of
1082: * primitive long values.
1083: *
1084: * @param set
1085: * the set to adapt.
1086: *
1087: * @return an adaption of a set to a set of
1088: * primitive long values.
1089: *
1090: * @since 1.2
1091: */
1092: public static LongSortedSet asLongs(SortedSet set) {
1093: return new SortedSetToLongSortedSetAdapter(set);
1094: }
1095:
1096: /**
1097: * Returns an adaption of a sorted set to a sorted set of
1098: * primitive float values.
1099: *
1100: * @param set
1101: * the set to adapt.
1102: *
1103: * @return an adaption of a set to a set of
1104: * primitive float values.
1105: *
1106: * @since 1.2
1107: */
1108: public static FloatSortedSet asFloats(SortedSet set) {
1109: return new SortedSetToFloatSortedSetAdapter(set);
1110: }
1111:
1112: /**
1113: * Returns an adaption of a sorted set to a sorted set of
1114: * primitive double values.
1115: *
1116: * @param set
1117: * the set to adapt.
1118: *
1119: * @return an adaption of a set to a set of
1120: * primitive double values.
1121: *
1122: * @since 1.2
1123: */
1124: public static DoubleSortedSet asDoubles(SortedSet set) {
1125: return new SortedSetToDoubleSortedSetAdapter(set);
1126: }
1127:
1128: // ---------------------------------------------------------------
1129: // TSortedSet -> SortedSet
1130: // ---------------------------------------------------------------
1131:
1132: /**
1133: * Returns an adaption of a sorted set of primitive boolean values
1134: * to a sorted set.
1135: *
1136: * @param set
1137: * the set to adapt.
1138: *
1139: * @return an adaption of a set of primitive boolean values
1140: * to a set.
1141: *
1142: * @since 1.2
1143: */
1144: public static SortedSet asObjects(BooleanSortedSet set) {
1145: return new BooleanSortedSetToSortedSetAdapter(set);
1146: }
1147:
1148: /**
1149: * Returns an adaption of a sorted set of primitive char values
1150: * to a sorted set.
1151: *
1152: * @param set
1153: * the set to adapt.
1154: *
1155: * @return an adaption of a set of primitive char values
1156: * to a set.
1157: *
1158: * @since 1.2
1159: */
1160: public static SortedSet asObjects(CharSortedSet set) {
1161: return new CharSortedSetToSortedSetAdapter(set);
1162: }
1163:
1164: /**
1165: * Returns an adaption of a sorted set of primitive byte values
1166: * to a sorted set.
1167: *
1168: * @param set
1169: * the set to adapt.
1170: *
1171: * @return an adaption of a set of primitive byte values
1172: * to a set.
1173: *
1174: * @since 1.2
1175: */
1176: public static SortedSet asObjects(ByteSortedSet set) {
1177: return new ByteSortedSetToSortedSetAdapter(set);
1178: }
1179:
1180: /**
1181: * Returns an adaption of a sorted set of primitive short values
1182: * to a sorted set.
1183: *
1184: * @param set
1185: * the set to adapt.
1186: *
1187: * @return an adaption of a set of primitive short values
1188: * to a set.
1189: *
1190: * @since 1.2
1191: */
1192: public static SortedSet asObjects(ShortSortedSet set) {
1193: return new ShortSortedSetToSortedSetAdapter(set);
1194: }
1195:
1196: /**
1197: * Returns an adaption of a sorted set of primitive int values
1198: * to a sorted set.
1199: *
1200: * @param set
1201: * the set to adapt.
1202: *
1203: * @return an adaption of a set of primitive int values
1204: * to a set.
1205: *
1206: * @since 1.2
1207: */
1208: public static SortedSet asObjects(IntSortedSet set) {
1209: return new IntSortedSetToSortedSetAdapter(set);
1210: }
1211:
1212: /**
1213: * Returns an adaption of a sorted set of primitive long values
1214: * to a sorted set.
1215: *
1216: * @param set
1217: * the set to adapt.
1218: *
1219: * @return an adaption of a set of primitive long values
1220: * to a set.
1221: *
1222: * @since 1.2
1223: */
1224: public static SortedSet asObjects(LongSortedSet set) {
1225: return new LongSortedSetToSortedSetAdapter(set);
1226: }
1227:
1228: /**
1229: * Returns an adaption of a sorted set of primitive float values
1230: * to a sorted set.
1231: *
1232: * @param set
1233: * the set to adapt.
1234: *
1235: * @return an adaption of a set of primitive float values
1236: * to a set.
1237: *
1238: * @since 1.2
1239: */
1240: public static SortedSet asObjects(FloatSortedSet set) {
1241: return new FloatSortedSetToSortedSetAdapter(set);
1242: }
1243:
1244: /**
1245: * Returns an adaption of a sorted set of primitive double values
1246: * to a sorted set.
1247: *
1248: * @param set
1249: * the set to adapt.
1250: *
1251: * @return an adaption of a set of primitive double values
1252: * to a set.
1253: *
1254: * @since 1.2
1255: */
1256: public static SortedSet asObjects(DoubleSortedSet set) {
1257: return new DoubleSortedSetToSortedSetAdapter(set);
1258: }
1259:
1260: // ---------------------------------------------------------------
1261: // List -> TList
1262: // ---------------------------------------------------------------
1263:
1264: /**
1265: * Returns an adaption of a list to a list of
1266: * primitive boolean values.
1267: *
1268: * @param list
1269: * the list to adapt.
1270: *
1271: * @return an adaption of a list to a list of
1272: * primitive boolean values.
1273: */
1274: public static BooleanList asBooleans(List list) {
1275: return new ListToBooleanListAdapter(list);
1276: }
1277:
1278: /**
1279: * Returns an adaption of a list to a list of
1280: * primitive char values.
1281: *
1282: * @param list
1283: * the list to adapt.
1284: *
1285: * @return an adaption of a list to a list of
1286: * primitive char values.
1287: */
1288: public static CharList asChars(List list) {
1289: return new ListToCharListAdapter(list);
1290: }
1291:
1292: /**
1293: * Returns an adaption of a list to a list of
1294: * primitive byte values.
1295: *
1296: * @param list
1297: * the list to adapt.
1298: *
1299: * @return an adaption of a list to a list of
1300: * primitive byte values.
1301: */
1302: public static ByteList asBytes(List list) {
1303: return new ListToByteListAdapter(list);
1304: }
1305:
1306: /**
1307: * Returns an adaption of a list to a list of
1308: * primitive short values.
1309: *
1310: * @param list
1311: * the list to adapt.
1312: *
1313: * @return an adaption of a list to a list of
1314: * primitive short values.
1315: */
1316: public static ShortList asShorts(List list) {
1317: return new ListToShortListAdapter(list);
1318: }
1319:
1320: /**
1321: * Returns an adaption of a list to a list of
1322: * primitive int values.
1323: *
1324: * @param list
1325: * the list to adapt.
1326: *
1327: * @return an adaption of a list to a list of
1328: * primitive int values.
1329: */
1330: public static IntList asInts(List list) {
1331: return new ListToIntListAdapter(list);
1332: }
1333:
1334: /**
1335: * Returns an adaption of a list to a list of
1336: * primitive long values.
1337: *
1338: * @param list
1339: * the list to adapt.
1340: *
1341: * @return an adaption of a list to a list of
1342: * primitive long values.
1343: */
1344: public static LongList asLongs(List list) {
1345: return new ListToLongListAdapter(list);
1346: }
1347:
1348: /**
1349: * Returns an adaption of a list to a list of
1350: * primitive float values.
1351: *
1352: * @param list
1353: * the list to adapt.
1354: *
1355: * @return an adaption of a list to a list of
1356: * primitive float values.
1357: */
1358: public static FloatList asFloats(List list) {
1359: return new ListToFloatListAdapter(list);
1360: }
1361:
1362: /**
1363: * Returns an adaption of a list to a list of
1364: * primitive double values.
1365: *
1366: * @param list
1367: * the list to adapt.
1368: *
1369: * @return an adaption of a list to a list of
1370: * primitive double values.
1371: */
1372: public static DoubleList asDoubles(List list) {
1373: return new ListToDoubleListAdapter(list);
1374: }
1375:
1376: // ---------------------------------------------------------------
1377: // TList -> List
1378: // ---------------------------------------------------------------
1379:
1380: /**
1381: * Returns an adaption of a list of primitive boolean values
1382: * to a list.
1383: *
1384: * @param list
1385: * the list to adapt.
1386: *
1387: * @return an adaption of a list of primitive boolean values
1388: * to a list.
1389: */
1390: public static List asObjects(BooleanList list) {
1391: return new BooleanListToListAdapter(list);
1392: }
1393:
1394: /**
1395: * Returns an adaption of a list of primitive char values
1396: * to a list.
1397: *
1398: * @param list
1399: * the list to adapt.
1400: *
1401: * @return an adaption of a list of primitive char values
1402: * to a list.
1403: */
1404: public static List asObjects(CharList list) {
1405: return new CharListToListAdapter(list);
1406: }
1407:
1408: /**
1409: * Returns an adaption of a list of primitive byte values
1410: * to a list.
1411: *
1412: * @param list
1413: * the list to adapt.
1414: *
1415: * @return an adaption of a list of primitive byte values
1416: * to a list.
1417: */
1418: public static List asObjects(ByteList list) {
1419: return new ByteListToListAdapter(list);
1420: }
1421:
1422: /**
1423: * Returns an adaption of a list of primitive short values
1424: * to a list.
1425: *
1426: * @param list
1427: * the list to adapt.
1428: *
1429: * @return an adaption of a list of primitive short values
1430: * to a list.
1431: */
1432: public static List asObjects(ShortList list) {
1433: return new ShortListToListAdapter(list);
1434: }
1435:
1436: /**
1437: * Returns an adaption of a list of primitive int values
1438: * to a list.
1439: *
1440: * @param list
1441: * the list to adapt.
1442: *
1443: * @return an adaption of a list of primitive int values
1444: * to a list.
1445: */
1446: public static List asObjects(IntList list) {
1447: return new IntListToListAdapter(list);
1448: }
1449:
1450: /**
1451: * Returns an adaption of a list of primitive long values
1452: * to a list.
1453: *
1454: * @param list
1455: * the list to adapt.
1456: *
1457: * @return an adaption of a list of primitive long values
1458: * to a list.
1459: */
1460: public static List asObjects(LongList list) {
1461: return new LongListToListAdapter(list);
1462: }
1463:
1464: /**
1465: * Returns an adaption of a list of primitive float values
1466: * to a list.
1467: *
1468: * @param list
1469: * the list to adapt.
1470: *
1471: * @return an adaption of a list of primitive float values
1472: * to a list.
1473: */
1474: public static List asObjects(FloatList list) {
1475: return new FloatListToListAdapter(list);
1476: }
1477:
1478: /**
1479: * Returns an adaption of a list of primitive double values
1480: * to a list.
1481: *
1482: * @param list
1483: * the list to adapt.
1484: *
1485: * @return an adaption of a list of primitive double values
1486: * to a list.
1487: */
1488: public static List asObjects(DoubleList list) {
1489: return new DoubleListToListAdapter(list);
1490: }
1491:
1492: // ---------------------------------------------------------------
1493: // Map -> TKeySMap
1494: // ---------------------------------------------------------------
1495:
1496: /**
1497: * Returns an adaption of a map to a primitive map from
1498: * boolean keys to boolean values.
1499: *
1500: * @param map
1501: * the map to adapt.
1502: *
1503: * @return an adaption of a map to a primitive map from
1504: * boolean keys to boolean values.
1505: */
1506: public static BooleanKeyBooleanMap asBooleanKeyBooleans(Map map) {
1507: return new MapToBooleanKeyBooleanMapAdapter(map);
1508: }
1509:
1510: /**
1511: * Returns an adaption of a map to a primitive map from
1512: * boolean keys to char values.
1513: *
1514: * @param map
1515: * the map to adapt.
1516: *
1517: * @return an adaption of a map to a primitive map from
1518: * boolean keys to char values.
1519: */
1520: public static BooleanKeyCharMap asBooleanKeyChars(Map map) {
1521: return new MapToBooleanKeyCharMapAdapter(map);
1522: }
1523:
1524: /**
1525: * Returns an adaption of a map to a primitive map from
1526: * boolean keys to byte values.
1527: *
1528: * @param map
1529: * the map to adapt.
1530: *
1531: * @return an adaption of a map to a primitive map from
1532: * boolean keys to byte values.
1533: */
1534: public static BooleanKeyByteMap asBooleanKeyBytes(Map map) {
1535: return new MapToBooleanKeyByteMapAdapter(map);
1536: }
1537:
1538: /**
1539: * Returns an adaption of a map to a primitive map from
1540: * boolean keys to short values.
1541: *
1542: * @param map
1543: * the map to adapt.
1544: *
1545: * @return an adaption of a map to a primitive map from
1546: * boolean keys to short values.
1547: */
1548: public static BooleanKeyShortMap asBooleanKeyShorts(Map map) {
1549: return new MapToBooleanKeyShortMapAdapter(map);
1550: }
1551:
1552: /**
1553: * Returns an adaption of a map to a primitive map from
1554: * boolean keys to int values.
1555: *
1556: * @param map
1557: * the map to adapt.
1558: *
1559: * @return an adaption of a map to a primitive map from
1560: * boolean keys to int values.
1561: */
1562: public static BooleanKeyIntMap asBooleanKeyInts(Map map) {
1563: return new MapToBooleanKeyIntMapAdapter(map);
1564: }
1565:
1566: /**
1567: * Returns an adaption of a map to a primitive map from
1568: * boolean keys to long values.
1569: *
1570: * @param map
1571: * the map to adapt.
1572: *
1573: * @return an adaption of a map to a primitive map from
1574: * boolean keys to long values.
1575: */
1576: public static BooleanKeyLongMap asBooleanKeyLongs(Map map) {
1577: return new MapToBooleanKeyLongMapAdapter(map);
1578: }
1579:
1580: /**
1581: * Returns an adaption of a map to a primitive map from
1582: * boolean keys to float values.
1583: *
1584: * @param map
1585: * the map to adapt.
1586: *
1587: * @return an adaption of a map to a primitive map from
1588: * boolean keys to float values.
1589: */
1590: public static BooleanKeyFloatMap asBooleanKeyFloats(Map map) {
1591: return new MapToBooleanKeyFloatMapAdapter(map);
1592: }
1593:
1594: /**
1595: * Returns an adaption of a map to a primitive map from
1596: * boolean keys to double values.
1597: *
1598: * @param map
1599: * the map to adapt.
1600: *
1601: * @return an adaption of a map to a primitive map from
1602: * boolean keys to double values.
1603: */
1604: public static BooleanKeyDoubleMap asBooleanKeyDoubles(Map map) {
1605: return new MapToBooleanKeyDoubleMapAdapter(map);
1606: }
1607:
1608: /**
1609: * Returns an adaption of a map to a primitive map from
1610: * char keys to boolean values.
1611: *
1612: * @param map
1613: * the map to adapt.
1614: *
1615: * @return an adaption of a map to a primitive map from
1616: * char keys to boolean values.
1617: */
1618: public static CharKeyBooleanMap asCharKeyBooleans(Map map) {
1619: return new MapToCharKeyBooleanMapAdapter(map);
1620: }
1621:
1622: /**
1623: * Returns an adaption of a map to a primitive map from
1624: * char keys to char values.
1625: *
1626: * @param map
1627: * the map to adapt.
1628: *
1629: * @return an adaption of a map to a primitive map from
1630: * char keys to char values.
1631: */
1632: public static CharKeyCharMap asCharKeyChars(Map map) {
1633: return new MapToCharKeyCharMapAdapter(map);
1634: }
1635:
1636: /**
1637: * Returns an adaption of a map to a primitive map from
1638: * char keys to byte values.
1639: *
1640: * @param map
1641: * the map to adapt.
1642: *
1643: * @return an adaption of a map to a primitive map from
1644: * char keys to byte values.
1645: */
1646: public static CharKeyByteMap asCharKeyBytes(Map map) {
1647: return new MapToCharKeyByteMapAdapter(map);
1648: }
1649:
1650: /**
1651: * Returns an adaption of a map to a primitive map from
1652: * char keys to short values.
1653: *
1654: * @param map
1655: * the map to adapt.
1656: *
1657: * @return an adaption of a map to a primitive map from
1658: * char keys to short values.
1659: */
1660: public static CharKeyShortMap asCharKeyShorts(Map map) {
1661: return new MapToCharKeyShortMapAdapter(map);
1662: }
1663:
1664: /**
1665: * Returns an adaption of a map to a primitive map from
1666: * char keys to int values.
1667: *
1668: * @param map
1669: * the map to adapt.
1670: *
1671: * @return an adaption of a map to a primitive map from
1672: * char keys to int values.
1673: */
1674: public static CharKeyIntMap asCharKeyInts(Map map) {
1675: return new MapToCharKeyIntMapAdapter(map);
1676: }
1677:
1678: /**
1679: * Returns an adaption of a map to a primitive map from
1680: * char keys to long values.
1681: *
1682: * @param map
1683: * the map to adapt.
1684: *
1685: * @return an adaption of a map to a primitive map from
1686: * char keys to long values.
1687: */
1688: public static CharKeyLongMap asCharKeyLongs(Map map) {
1689: return new MapToCharKeyLongMapAdapter(map);
1690: }
1691:
1692: /**
1693: * Returns an adaption of a map to a primitive map from
1694: * char keys to float values.
1695: *
1696: * @param map
1697: * the map to adapt.
1698: *
1699: * @return an adaption of a map to a primitive map from
1700: * char keys to float values.
1701: */
1702: public static CharKeyFloatMap asCharKeyFloats(Map map) {
1703: return new MapToCharKeyFloatMapAdapter(map);
1704: }
1705:
1706: /**
1707: * Returns an adaption of a map to a primitive map from
1708: * char keys to double values.
1709: *
1710: * @param map
1711: * the map to adapt.
1712: *
1713: * @return an adaption of a map to a primitive map from
1714: * char keys to double values.
1715: */
1716: public static CharKeyDoubleMap asCharKeyDoubles(Map map) {
1717: return new MapToCharKeyDoubleMapAdapter(map);
1718: }
1719:
1720: /**
1721: * Returns an adaption of a map to a primitive map from
1722: * byte keys to boolean values.
1723: *
1724: * @param map
1725: * the map to adapt.
1726: *
1727: * @return an adaption of a map to a primitive map from
1728: * byte keys to boolean values.
1729: */
1730: public static ByteKeyBooleanMap asByteKeyBooleans(Map map) {
1731: return new MapToByteKeyBooleanMapAdapter(map);
1732: }
1733:
1734: /**
1735: * Returns an adaption of a map to a primitive map from
1736: * byte keys to char values.
1737: *
1738: * @param map
1739: * the map to adapt.
1740: *
1741: * @return an adaption of a map to a primitive map from
1742: * byte keys to char values.
1743: */
1744: public static ByteKeyCharMap asByteKeyChars(Map map) {
1745: return new MapToByteKeyCharMapAdapter(map);
1746: }
1747:
1748: /**
1749: * Returns an adaption of a map to a primitive map from
1750: * byte keys to byte values.
1751: *
1752: * @param map
1753: * the map to adapt.
1754: *
1755: * @return an adaption of a map to a primitive map from
1756: * byte keys to byte values.
1757: */
1758: public static ByteKeyByteMap asByteKeyBytes(Map map) {
1759: return new MapToByteKeyByteMapAdapter(map);
1760: }
1761:
1762: /**
1763: * Returns an adaption of a map to a primitive map from
1764: * byte keys to short values.
1765: *
1766: * @param map
1767: * the map to adapt.
1768: *
1769: * @return an adaption of a map to a primitive map from
1770: * byte keys to short values.
1771: */
1772: public static ByteKeyShortMap asByteKeyShorts(Map map) {
1773: return new MapToByteKeyShortMapAdapter(map);
1774: }
1775:
1776: /**
1777: * Returns an adaption of a map to a primitive map from
1778: * byte keys to int values.
1779: *
1780: * @param map
1781: * the map to adapt.
1782: *
1783: * @return an adaption of a map to a primitive map from
1784: * byte keys to int values.
1785: */
1786: public static ByteKeyIntMap asByteKeyInts(Map map) {
1787: return new MapToByteKeyIntMapAdapter(map);
1788: }
1789:
1790: /**
1791: * Returns an adaption of a map to a primitive map from
1792: * byte keys to long values.
1793: *
1794: * @param map
1795: * the map to adapt.
1796: *
1797: * @return an adaption of a map to a primitive map from
1798: * byte keys to long values.
1799: */
1800: public static ByteKeyLongMap asByteKeyLongs(Map map) {
1801: return new MapToByteKeyLongMapAdapter(map);
1802: }
1803:
1804: /**
1805: * Returns an adaption of a map to a primitive map from
1806: * byte keys to float values.
1807: *
1808: * @param map
1809: * the map to adapt.
1810: *
1811: * @return an adaption of a map to a primitive map from
1812: * byte keys to float values.
1813: */
1814: public static ByteKeyFloatMap asByteKeyFloats(Map map) {
1815: return new MapToByteKeyFloatMapAdapter(map);
1816: }
1817:
1818: /**
1819: * Returns an adaption of a map to a primitive map from
1820: * byte keys to double values.
1821: *
1822: * @param map
1823: * the map to adapt.
1824: *
1825: * @return an adaption of a map to a primitive map from
1826: * byte keys to double values.
1827: */
1828: public static ByteKeyDoubleMap asByteKeyDoubles(Map map) {
1829: return new MapToByteKeyDoubleMapAdapter(map);
1830: }
1831:
1832: /**
1833: * Returns an adaption of a map to a primitive map from
1834: * short keys to boolean values.
1835: *
1836: * @param map
1837: * the map to adapt.
1838: *
1839: * @return an adaption of a map to a primitive map from
1840: * short keys to boolean values.
1841: */
1842: public static ShortKeyBooleanMap asShortKeyBooleans(Map map) {
1843: return new MapToShortKeyBooleanMapAdapter(map);
1844: }
1845:
1846: /**
1847: * Returns an adaption of a map to a primitive map from
1848: * short keys to char values.
1849: *
1850: * @param map
1851: * the map to adapt.
1852: *
1853: * @return an adaption of a map to a primitive map from
1854: * short keys to char values.
1855: */
1856: public static ShortKeyCharMap asShortKeyChars(Map map) {
1857: return new MapToShortKeyCharMapAdapter(map);
1858: }
1859:
1860: /**
1861: * Returns an adaption of a map to a primitive map from
1862: * short keys to byte values.
1863: *
1864: * @param map
1865: * the map to adapt.
1866: *
1867: * @return an adaption of a map to a primitive map from
1868: * short keys to byte values.
1869: */
1870: public static ShortKeyByteMap asShortKeyBytes(Map map) {
1871: return new MapToShortKeyByteMapAdapter(map);
1872: }
1873:
1874: /**
1875: * Returns an adaption of a map to a primitive map from
1876: * short keys to short values.
1877: *
1878: * @param map
1879: * the map to adapt.
1880: *
1881: * @return an adaption of a map to a primitive map from
1882: * short keys to short values.
1883: */
1884: public static ShortKeyShortMap asShortKeyShorts(Map map) {
1885: return new MapToShortKeyShortMapAdapter(map);
1886: }
1887:
1888: /**
1889: * Returns an adaption of a map to a primitive map from
1890: * short keys to int values.
1891: *
1892: * @param map
1893: * the map to adapt.
1894: *
1895: * @return an adaption of a map to a primitive map from
1896: * short keys to int values.
1897: */
1898: public static ShortKeyIntMap asShortKeyInts(Map map) {
1899: return new MapToShortKeyIntMapAdapter(map);
1900: }
1901:
1902: /**
1903: * Returns an adaption of a map to a primitive map from
1904: * short keys to long values.
1905: *
1906: * @param map
1907: * the map to adapt.
1908: *
1909: * @return an adaption of a map to a primitive map from
1910: * short keys to long values.
1911: */
1912: public static ShortKeyLongMap asShortKeyLongs(Map map) {
1913: return new MapToShortKeyLongMapAdapter(map);
1914: }
1915:
1916: /**
1917: * Returns an adaption of a map to a primitive map from
1918: * short keys to float values.
1919: *
1920: * @param map
1921: * the map to adapt.
1922: *
1923: * @return an adaption of a map to a primitive map from
1924: * short keys to float values.
1925: */
1926: public static ShortKeyFloatMap asShortKeyFloats(Map map) {
1927: return new MapToShortKeyFloatMapAdapter(map);
1928: }
1929:
1930: /**
1931: * Returns an adaption of a map to a primitive map from
1932: * short keys to double values.
1933: *
1934: * @param map
1935: * the map to adapt.
1936: *
1937: * @return an adaption of a map to a primitive map from
1938: * short keys to double values.
1939: */
1940: public static ShortKeyDoubleMap asShortKeyDoubles(Map map) {
1941: return new MapToShortKeyDoubleMapAdapter(map);
1942: }
1943:
1944: /**
1945: * Returns an adaption of a map to a primitive map from
1946: * int keys to boolean values.
1947: *
1948: * @param map
1949: * the map to adapt.
1950: *
1951: * @return an adaption of a map to a primitive map from
1952: * int keys to boolean values.
1953: */
1954: public static IntKeyBooleanMap asIntKeyBooleans(Map map) {
1955: return new MapToIntKeyBooleanMapAdapter(map);
1956: }
1957:
1958: /**
1959: * Returns an adaption of a map to a primitive map from
1960: * int keys to char values.
1961: *
1962: * @param map
1963: * the map to adapt.
1964: *
1965: * @return an adaption of a map to a primitive map from
1966: * int keys to char values.
1967: */
1968: public static IntKeyCharMap asIntKeyChars(Map map) {
1969: return new MapToIntKeyCharMapAdapter(map);
1970: }
1971:
1972: /**
1973: * Returns an adaption of a map to a primitive map from
1974: * int keys to byte values.
1975: *
1976: * @param map
1977: * the map to adapt.
1978: *
1979: * @return an adaption of a map to a primitive map from
1980: * int keys to byte values.
1981: */
1982: public static IntKeyByteMap asIntKeyBytes(Map map) {
1983: return new MapToIntKeyByteMapAdapter(map);
1984: }
1985:
1986: /**
1987: * Returns an adaption of a map to a primitive map from
1988: * int keys to short values.
1989: *
1990: * @param map
1991: * the map to adapt.
1992: *
1993: * @return an adaption of a map to a primitive map from
1994: * int keys to short values.
1995: */
1996: public static IntKeyShortMap asIntKeyShorts(Map map) {
1997: return new MapToIntKeyShortMapAdapter(map);
1998: }
1999:
2000: /**
2001: * Returns an adaption of a map to a primitive map from
2002: * int keys to int values.
2003: *
2004: * @param map
2005: * the map to adapt.
2006: *
2007: * @return an adaption of a map to a primitive map from
2008: * int keys to int values.
2009: */
2010: public static IntKeyIntMap asIntKeyInts(Map map) {
2011: return new MapToIntKeyIntMapAdapter(map);
2012: }
2013:
2014: /**
2015: * Returns an adaption of a map to a primitive map from
2016: * int keys to long values.
2017: *
2018: * @param map
2019: * the map to adapt.
2020: *
2021: * @return an adaption of a map to a primitive map from
2022: * int keys to long values.
2023: */
2024: public static IntKeyLongMap asIntKeyLongs(Map map) {
2025: return new MapToIntKeyLongMapAdapter(map);
2026: }
2027:
2028: /**
2029: * Returns an adaption of a map to a primitive map from
2030: * int keys to float values.
2031: *
2032: * @param map
2033: * the map to adapt.
2034: *
2035: * @return an adaption of a map to a primitive map from
2036: * int keys to float values.
2037: */
2038: public static IntKeyFloatMap asIntKeyFloats(Map map) {
2039: return new MapToIntKeyFloatMapAdapter(map);
2040: }
2041:
2042: /**
2043: * Returns an adaption of a map to a primitive map from
2044: * int keys to double values.
2045: *
2046: * @param map
2047: * the map to adapt.
2048: *
2049: * @return an adaption of a map to a primitive map from
2050: * int keys to double values.
2051: */
2052: public static IntKeyDoubleMap asIntKeyDoubles(Map map) {
2053: return new MapToIntKeyDoubleMapAdapter(map);
2054: }
2055:
2056: /**
2057: * Returns an adaption of a map to a primitive map from
2058: * long keys to boolean values.
2059: *
2060: * @param map
2061: * the map to adapt.
2062: *
2063: * @return an adaption of a map to a primitive map from
2064: * long keys to boolean values.
2065: */
2066: public static LongKeyBooleanMap asLongKeyBooleans(Map map) {
2067: return new MapToLongKeyBooleanMapAdapter(map);
2068: }
2069:
2070: /**
2071: * Returns an adaption of a map to a primitive map from
2072: * long keys to char values.
2073: *
2074: * @param map
2075: * the map to adapt.
2076: *
2077: * @return an adaption of a map to a primitive map from
2078: * long keys to char values.
2079: */
2080: public static LongKeyCharMap asLongKeyChars(Map map) {
2081: return new MapToLongKeyCharMapAdapter(map);
2082: }
2083:
2084: /**
2085: * Returns an adaption of a map to a primitive map from
2086: * long keys to byte values.
2087: *
2088: * @param map
2089: * the map to adapt.
2090: *
2091: * @return an adaption of a map to a primitive map from
2092: * long keys to byte values.
2093: */
2094: public static LongKeyByteMap asLongKeyBytes(Map map) {
2095: return new MapToLongKeyByteMapAdapter(map);
2096: }
2097:
2098: /**
2099: * Returns an adaption of a map to a primitive map from
2100: * long keys to short values.
2101: *
2102: * @param map
2103: * the map to adapt.
2104: *
2105: * @return an adaption of a map to a primitive map from
2106: * long keys to short values.
2107: */
2108: public static LongKeyShortMap asLongKeyShorts(Map map) {
2109: return new MapToLongKeyShortMapAdapter(map);
2110: }
2111:
2112: /**
2113: * Returns an adaption of a map to a primitive map from
2114: * long keys to int values.
2115: *
2116: * @param map
2117: * the map to adapt.
2118: *
2119: * @return an adaption of a map to a primitive map from
2120: * long keys to int values.
2121: */
2122: public static LongKeyIntMap asLongKeyInts(Map map) {
2123: return new MapToLongKeyIntMapAdapter(map);
2124: }
2125:
2126: /**
2127: * Returns an adaption of a map to a primitive map from
2128: * long keys to long values.
2129: *
2130: * @param map
2131: * the map to adapt.
2132: *
2133: * @return an adaption of a map to a primitive map from
2134: * long keys to long values.
2135: */
2136: public static LongKeyLongMap asLongKeyLongs(Map map) {
2137: return new MapToLongKeyLongMapAdapter(map);
2138: }
2139:
2140: /**
2141: * Returns an adaption of a map to a primitive map from
2142: * long keys to float values.
2143: *
2144: * @param map
2145: * the map to adapt.
2146: *
2147: * @return an adaption of a map to a primitive map from
2148: * long keys to float values.
2149: */
2150: public static LongKeyFloatMap asLongKeyFloats(Map map) {
2151: return new MapToLongKeyFloatMapAdapter(map);
2152: }
2153:
2154: /**
2155: * Returns an adaption of a map to a primitive map from
2156: * long keys to double values.
2157: *
2158: * @param map
2159: * the map to adapt.
2160: *
2161: * @return an adaption of a map to a primitive map from
2162: * long keys to double values.
2163: */
2164: public static LongKeyDoubleMap asLongKeyDoubles(Map map) {
2165: return new MapToLongKeyDoubleMapAdapter(map);
2166: }
2167:
2168: /**
2169: * Returns an adaption of a map to a primitive map from
2170: * float keys to boolean values.
2171: *
2172: * @param map
2173: * the map to adapt.
2174: *
2175: * @return an adaption of a map to a primitive map from
2176: * float keys to boolean values.
2177: */
2178: public static FloatKeyBooleanMap asFloatKeyBooleans(Map map) {
2179: return new MapToFloatKeyBooleanMapAdapter(map);
2180: }
2181:
2182: /**
2183: * Returns an adaption of a map to a primitive map from
2184: * float keys to char values.
2185: *
2186: * @param map
2187: * the map to adapt.
2188: *
2189: * @return an adaption of a map to a primitive map from
2190: * float keys to char values.
2191: */
2192: public static FloatKeyCharMap asFloatKeyChars(Map map) {
2193: return new MapToFloatKeyCharMapAdapter(map);
2194: }
2195:
2196: /**
2197: * Returns an adaption of a map to a primitive map from
2198: * float keys to byte values.
2199: *
2200: * @param map
2201: * the map to adapt.
2202: *
2203: * @return an adaption of a map to a primitive map from
2204: * float keys to byte values.
2205: */
2206: public static FloatKeyByteMap asFloatKeyBytes(Map map) {
2207: return new MapToFloatKeyByteMapAdapter(map);
2208: }
2209:
2210: /**
2211: * Returns an adaption of a map to a primitive map from
2212: * float keys to short values.
2213: *
2214: * @param map
2215: * the map to adapt.
2216: *
2217: * @return an adaption of a map to a primitive map from
2218: * float keys to short values.
2219: */
2220: public static FloatKeyShortMap asFloatKeyShorts(Map map) {
2221: return new MapToFloatKeyShortMapAdapter(map);
2222: }
2223:
2224: /**
2225: * Returns an adaption of a map to a primitive map from
2226: * float keys to int values.
2227: *
2228: * @param map
2229: * the map to adapt.
2230: *
2231: * @return an adaption of a map to a primitive map from
2232: * float keys to int values.
2233: */
2234: public static FloatKeyIntMap asFloatKeyInts(Map map) {
2235: return new MapToFloatKeyIntMapAdapter(map);
2236: }
2237:
2238: /**
2239: * Returns an adaption of a map to a primitive map from
2240: * float keys to long values.
2241: *
2242: * @param map
2243: * the map to adapt.
2244: *
2245: * @return an adaption of a map to a primitive map from
2246: * float keys to long values.
2247: */
2248: public static FloatKeyLongMap asFloatKeyLongs(Map map) {
2249: return new MapToFloatKeyLongMapAdapter(map);
2250: }
2251:
2252: /**
2253: * Returns an adaption of a map to a primitive map from
2254: * float keys to float values.
2255: *
2256: * @param map
2257: * the map to adapt.
2258: *
2259: * @return an adaption of a map to a primitive map from
2260: * float keys to float values.
2261: */
2262: public static FloatKeyFloatMap asFloatKeyFloats(Map map) {
2263: return new MapToFloatKeyFloatMapAdapter(map);
2264: }
2265:
2266: /**
2267: * Returns an adaption of a map to a primitive map from
2268: * float keys to double values.
2269: *
2270: * @param map
2271: * the map to adapt.
2272: *
2273: * @return an adaption of a map to a primitive map from
2274: * float keys to double values.
2275: */
2276: public static FloatKeyDoubleMap asFloatKeyDoubles(Map map) {
2277: return new MapToFloatKeyDoubleMapAdapter(map);
2278: }
2279:
2280: /**
2281: * Returns an adaption of a map to a primitive map from
2282: * double keys to boolean values.
2283: *
2284: * @param map
2285: * the map to adapt.
2286: *
2287: * @return an adaption of a map to a primitive map from
2288: * double keys to boolean values.
2289: */
2290: public static DoubleKeyBooleanMap asDoubleKeyBooleans(Map map) {
2291: return new MapToDoubleKeyBooleanMapAdapter(map);
2292: }
2293:
2294: /**
2295: * Returns an adaption of a map to a primitive map from
2296: * double keys to char values.
2297: *
2298: * @param map
2299: * the map to adapt.
2300: *
2301: * @return an adaption of a map to a primitive map from
2302: * double keys to char values.
2303: */
2304: public static DoubleKeyCharMap asDoubleKeyChars(Map map) {
2305: return new MapToDoubleKeyCharMapAdapter(map);
2306: }
2307:
2308: /**
2309: * Returns an adaption of a map to a primitive map from
2310: * double keys to byte values.
2311: *
2312: * @param map
2313: * the map to adapt.
2314: *
2315: * @return an adaption of a map to a primitive map from
2316: * double keys to byte values.
2317: */
2318: public static DoubleKeyByteMap asDoubleKeyBytes(Map map) {
2319: return new MapToDoubleKeyByteMapAdapter(map);
2320: }
2321:
2322: /**
2323: * Returns an adaption of a map to a primitive map from
2324: * double keys to short values.
2325: *
2326: * @param map
2327: * the map to adapt.
2328: *
2329: * @return an adaption of a map to a primitive map from
2330: * double keys to short values.
2331: */
2332: public static DoubleKeyShortMap asDoubleKeyShorts(Map map) {
2333: return new MapToDoubleKeyShortMapAdapter(map);
2334: }
2335:
2336: /**
2337: * Returns an adaption of a map to a primitive map from
2338: * double keys to int values.
2339: *
2340: * @param map
2341: * the map to adapt.
2342: *
2343: * @return an adaption of a map to a primitive map from
2344: * double keys to int values.
2345: */
2346: public static DoubleKeyIntMap asDoubleKeyInts(Map map) {
2347: return new MapToDoubleKeyIntMapAdapter(map);
2348: }
2349:
2350: /**
2351: * Returns an adaption of a map to a primitive map from
2352: * double keys to long values.
2353: *
2354: * @param map
2355: * the map to adapt.
2356: *
2357: * @return an adaption of a map to a primitive map from
2358: * double keys to long values.
2359: */
2360: public static DoubleKeyLongMap asDoubleKeyLongs(Map map) {
2361: return new MapToDoubleKeyLongMapAdapter(map);
2362: }
2363:
2364: /**
2365: * Returns an adaption of a map to a primitive map from
2366: * double keys to float values.
2367: *
2368: * @param map
2369: * the map to adapt.
2370: *
2371: * @return an adaption of a map to a primitive map from
2372: * double keys to float values.
2373: */
2374: public static DoubleKeyFloatMap asDoubleKeyFloats(Map map) {
2375: return new MapToDoubleKeyFloatMapAdapter(map);
2376: }
2377:
2378: /**
2379: * Returns an adaption of a map to a primitive map from
2380: * double keys to double values.
2381: *
2382: * @param map
2383: * the map to adapt.
2384: *
2385: * @return an adaption of a map to a primitive map from
2386: * double keys to double values.
2387: */
2388: public static DoubleKeyDoubleMap asDoubleKeyDoubles(Map map) {
2389: return new MapToDoubleKeyDoubleMapAdapter(map);
2390: }
2391:
2392: // ---------------------------------------------------------------
2393: // TKeySMap -> Map
2394: // ---------------------------------------------------------------
2395:
2396: /**
2397: * Returns an adaption of a primitive map from
2398: * boolean keys to boolean values to a map.
2399: *
2400: * @param map
2401: * the primitive map to adapt.
2402: *
2403: * @return an adaption of the specified primitive
2404: * map to a map.
2405: */
2406: public static Map asObjects(BooleanKeyBooleanMap map) {
2407: return new BooleanKeyBooleanMapToMapAdapter(map);
2408: }
2409:
2410: /**
2411: * Returns an adaption of a primitive map from
2412: * boolean keys to byte values to a map.
2413: *
2414: * @param map
2415: * the primitive map to adapt.
2416: *
2417: * @return an adaption of the specified primitive
2418: * map to a map.
2419: */
2420: public static Map asObjects(BooleanKeyByteMap map) {
2421: return new BooleanKeyByteMapToMapAdapter(map);
2422: }
2423:
2424: /**
2425: * Returns an adaption of a primitive map from
2426: * boolean keys to short values to a map.
2427: *
2428: * @param map
2429: * the primitive map to adapt.
2430: *
2431: * @return an adaption of the specified primitive
2432: * map to a map.
2433: */
2434: public static Map asObjects(BooleanKeyShortMap map) {
2435: return new BooleanKeyShortMapToMapAdapter(map);
2436: }
2437:
2438: /**
2439: * Returns an adaption of a primitive map from
2440: * boolean keys to int values to a map.
2441: *
2442: * @param map
2443: * the primitive map to adapt.
2444: *
2445: * @return an adaption of the specified primitive
2446: * map to a map.
2447: */
2448: public static Map asObjects(BooleanKeyIntMap map) {
2449: return new BooleanKeyIntMapToMapAdapter(map);
2450: }
2451:
2452: /**
2453: * Returns an adaption of a primitive map from
2454: * boolean keys to long values to a map.
2455: *
2456: * @param map
2457: * the primitive map to adapt.
2458: *
2459: * @return an adaption of the specified primitive
2460: * map to a map.
2461: */
2462: public static Map asObjects(BooleanKeyLongMap map) {
2463: return new BooleanKeyLongMapToMapAdapter(map);
2464: }
2465:
2466: /**
2467: * Returns an adaption of a primitive map from
2468: * boolean keys to float values to a map.
2469: *
2470: * @param map
2471: * the primitive map to adapt.
2472: *
2473: * @return an adaption of the specified primitive
2474: * map to a map.
2475: */
2476: public static Map asObjects(BooleanKeyFloatMap map) {
2477: return new BooleanKeyFloatMapToMapAdapter(map);
2478: }
2479:
2480: /**
2481: * Returns an adaption of a primitive map from
2482: * boolean keys to double values to a map.
2483: *
2484: * @param map
2485: * the primitive map to adapt.
2486: *
2487: * @return an adaption of the specified primitive
2488: * map to a map.
2489: */
2490: public static Map asObjects(BooleanKeyDoubleMap map) {
2491: return new BooleanKeyDoubleMapToMapAdapter(map);
2492: }
2493:
2494: /**
2495: * Returns an adaption of a primitive map from
2496: * char keys to boolean values to a map.
2497: *
2498: * @param map
2499: * the primitive map to adapt.
2500: *
2501: * @return an adaption of the specified primitive
2502: * map to a map.
2503: */
2504: public static Map asObjects(CharKeyBooleanMap map) {
2505: return new CharKeyBooleanMapToMapAdapter(map);
2506: }
2507:
2508: /**
2509: * Returns an adaption of a primitive map from
2510: * char keys to char values to a map.
2511: *
2512: * @param map
2513: * the primitive map to adapt.
2514: *
2515: * @return an adaption of the specified primitive
2516: * map to a map.
2517: */
2518: public static Map asObjects(CharKeyCharMap map) {
2519: return new CharKeyCharMapToMapAdapter(map);
2520: }
2521:
2522: /**
2523: * Returns an adaption of a primitive map from
2524: * char keys to byte values to a map.
2525: *
2526: * @param map
2527: * the primitive map to adapt.
2528: *
2529: * @return an adaption of the specified primitive
2530: * map to a map.
2531: */
2532: public static Map asObjects(CharKeyByteMap map) {
2533: return new CharKeyByteMapToMapAdapter(map);
2534: }
2535:
2536: /**
2537: * Returns an adaption of a primitive map from
2538: * char keys to short values to a map.
2539: *
2540: * @param map
2541: * the primitive map to adapt.
2542: *
2543: * @return an adaption of the specified primitive
2544: * map to a map.
2545: */
2546: public static Map asObjects(CharKeyShortMap map) {
2547: return new CharKeyShortMapToMapAdapter(map);
2548: }
2549:
2550: /**
2551: * Returns an adaption of a primitive map from
2552: * char keys to int values to a map.
2553: *
2554: * @param map
2555: * the primitive map to adapt.
2556: *
2557: * @return an adaption of the specified primitive
2558: * map to a map.
2559: */
2560: public static Map asObjects(CharKeyIntMap map) {
2561: return new CharKeyIntMapToMapAdapter(map);
2562: }
2563:
2564: /**
2565: * Returns an adaption of a primitive map from
2566: * char keys to long values to a map.
2567: *
2568: * @param map
2569: * the primitive map to adapt.
2570: *
2571: * @return an adaption of the specified primitive
2572: * map to a map.
2573: */
2574: public static Map asObjects(CharKeyLongMap map) {
2575: return new CharKeyLongMapToMapAdapter(map);
2576: }
2577:
2578: /**
2579: * Returns an adaption of a primitive map from
2580: * char keys to float values to a map.
2581: *
2582: * @param map
2583: * the primitive map to adapt.
2584: *
2585: * @return an adaption of the specified primitive
2586: * map to a map.
2587: */
2588: public static Map asObjects(CharKeyFloatMap map) {
2589: return new CharKeyFloatMapToMapAdapter(map);
2590: }
2591:
2592: /**
2593: * Returns an adaption of a primitive map from
2594: * char keys to double values to a map.
2595: *
2596: * @param map
2597: * the primitive map to adapt.
2598: *
2599: * @return an adaption of the specified primitive
2600: * map to a map.
2601: */
2602: public static Map asObjects(CharKeyDoubleMap map) {
2603: return new CharKeyDoubleMapToMapAdapter(map);
2604: }
2605:
2606: /**
2607: * Returns an adaption of a primitive map from
2608: * byte keys to boolean values to a map.
2609: *
2610: * @param map
2611: * the primitive map to adapt.
2612: *
2613: * @return an adaption of the specified primitive
2614: * map to a map.
2615: */
2616: public static Map asObjects(ByteKeyBooleanMap map) {
2617: return new ByteKeyBooleanMapToMapAdapter(map);
2618: }
2619:
2620: /**
2621: * Returns an adaption of a primitive map from
2622: * byte keys to char values to a map.
2623: *
2624: * @param map
2625: * the primitive map to adapt.
2626: *
2627: * @return an adaption of the specified primitive
2628: * map to a map.
2629: */
2630: public static Map asObjects(ByteKeyCharMap map) {
2631: return new ByteKeyCharMapToMapAdapter(map);
2632: }
2633:
2634: /**
2635: * Returns an adaption of a primitive map from
2636: * byte keys to byte values to a map.
2637: *
2638: * @param map
2639: * the primitive map to adapt.
2640: *
2641: * @return an adaption of the specified primitive
2642: * map to a map.
2643: */
2644: public static Map asObjects(ByteKeyByteMap map) {
2645: return new ByteKeyByteMapToMapAdapter(map);
2646: }
2647:
2648: /**
2649: * Returns an adaption of a primitive map from
2650: * byte keys to short values to a map.
2651: *
2652: * @param map
2653: * the primitive map to adapt.
2654: *
2655: * @return an adaption of the specified primitive
2656: * map to a map.
2657: */
2658: public static Map asObjects(ByteKeyShortMap map) {
2659: return new ByteKeyShortMapToMapAdapter(map);
2660: }
2661:
2662: /**
2663: * Returns an adaption of a primitive map from
2664: * byte keys to int values to a map.
2665: *
2666: * @param map
2667: * the primitive map to adapt.
2668: *
2669: * @return an adaption of the specified primitive
2670: * map to a map.
2671: */
2672: public static Map asObjects(ByteKeyIntMap map) {
2673: return new ByteKeyIntMapToMapAdapter(map);
2674: }
2675:
2676: /**
2677: * Returns an adaption of a primitive map from
2678: * byte keys to long values to a map.
2679: *
2680: * @param map
2681: * the primitive map to adapt.
2682: *
2683: * @return an adaption of the specified primitive
2684: * map to a map.
2685: */
2686: public static Map asObjects(ByteKeyLongMap map) {
2687: return new ByteKeyLongMapToMapAdapter(map);
2688: }
2689:
2690: /**
2691: * Returns an adaption of a primitive map from
2692: * byte keys to float values to a map.
2693: *
2694: * @param map
2695: * the primitive map to adapt.
2696: *
2697: * @return an adaption of the specified primitive
2698: * map to a map.
2699: */
2700: public static Map asObjects(ByteKeyFloatMap map) {
2701: return new ByteKeyFloatMapToMapAdapter(map);
2702: }
2703:
2704: /**
2705: * Returns an adaption of a primitive map from
2706: * byte keys to double values to a map.
2707: *
2708: * @param map
2709: * the primitive map to adapt.
2710: *
2711: * @return an adaption of the specified primitive
2712: * map to a map.
2713: */
2714: public static Map asObjects(ByteKeyDoubleMap map) {
2715: return new ByteKeyDoubleMapToMapAdapter(map);
2716: }
2717:
2718: /**
2719: * Returns an adaption of a primitive map from
2720: * short keys to boolean values to a map.
2721: *
2722: * @param map
2723: * the primitive map to adapt.
2724: *
2725: * @return an adaption of the specified primitive
2726: * map to a map.
2727: */
2728: public static Map asObjects(ShortKeyBooleanMap map) {
2729: return new ShortKeyBooleanMapToMapAdapter(map);
2730: }
2731:
2732: /**
2733: * Returns an adaption of a primitive map from
2734: * short keys to char values to a map.
2735: *
2736: * @param map
2737: * the primitive map to adapt.
2738: *
2739: * @return an adaption of the specified primitive
2740: * map to a map.
2741: */
2742: public static Map asObjects(ShortKeyCharMap map) {
2743: return new ShortKeyCharMapToMapAdapter(map);
2744: }
2745:
2746: /**
2747: * Returns an adaption of a primitive map from
2748: * short keys to byte values to a map.
2749: *
2750: * @param map
2751: * the primitive map to adapt.
2752: *
2753: * @return an adaption of the specified primitive
2754: * map to a map.
2755: */
2756: public static Map asObjects(ShortKeyByteMap map) {
2757: return new ShortKeyByteMapToMapAdapter(map);
2758: }
2759:
2760: /**
2761: * Returns an adaption of a primitive map from
2762: * short keys to short values to a map.
2763: *
2764: * @param map
2765: * the primitive map to adapt.
2766: *
2767: * @return an adaption of the specified primitive
2768: * map to a map.
2769: */
2770: public static Map asObjects(ShortKeyShortMap map) {
2771: return new ShortKeyShortMapToMapAdapter(map);
2772: }
2773:
2774: /**
2775: * Returns an adaption of a primitive map from
2776: * short keys to int values to a map.
2777: *
2778: * @param map
2779: * the primitive map to adapt.
2780: *
2781: * @return an adaption of the specified primitive
2782: * map to a map.
2783: */
2784: public static Map asObjects(ShortKeyIntMap map) {
2785: return new ShortKeyIntMapToMapAdapter(map);
2786: }
2787:
2788: /**
2789: * Returns an adaption of a primitive map from
2790: * short keys to long values to a map.
2791: *
2792: * @param map
2793: * the primitive map to adapt.
2794: *
2795: * @return an adaption of the specified primitive
2796: * map to a map.
2797: */
2798: public static Map asObjects(ShortKeyLongMap map) {
2799: return new ShortKeyLongMapToMapAdapter(map);
2800: }
2801:
2802: /**
2803: * Returns an adaption of a primitive map from
2804: * short keys to float values to a map.
2805: *
2806: * @param map
2807: * the primitive map to adapt.
2808: *
2809: * @return an adaption of the specified primitive
2810: * map to a map.
2811: */
2812: public static Map asObjects(ShortKeyFloatMap map) {
2813: return new ShortKeyFloatMapToMapAdapter(map);
2814: }
2815:
2816: /**
2817: * Returns an adaption of a primitive map from
2818: * short keys to double values to a map.
2819: *
2820: * @param map
2821: * the primitive map to adapt.
2822: *
2823: * @return an adaption of the specified primitive
2824: * map to a map.
2825: */
2826: public static Map asObjects(ShortKeyDoubleMap map) {
2827: return new ShortKeyDoubleMapToMapAdapter(map);
2828: }
2829:
2830: /**
2831: * Returns an adaption of a primitive map from
2832: * int keys to boolean values to a map.
2833: *
2834: * @param map
2835: * the primitive map to adapt.
2836: *
2837: * @return an adaption of the specified primitive
2838: * map to a map.
2839: */
2840: public static Map asObjects(IntKeyBooleanMap map) {
2841: return new IntKeyBooleanMapToMapAdapter(map);
2842: }
2843:
2844: /**
2845: * Returns an adaption of a primitive map from
2846: * int keys to char values to a map.
2847: *
2848: * @param map
2849: * the primitive map to adapt.
2850: *
2851: * @return an adaption of the specified primitive
2852: * map to a map.
2853: */
2854: public static Map asObjects(IntKeyCharMap map) {
2855: return new IntKeyCharMapToMapAdapter(map);
2856: }
2857:
2858: /**
2859: * Returns an adaption of a primitive map from
2860: * int keys to byte values to a map.
2861: *
2862: * @param map
2863: * the primitive map to adapt.
2864: *
2865: * @return an adaption of the specified primitive
2866: * map to a map.
2867: */
2868: public static Map asObjects(IntKeyByteMap map) {
2869: return new IntKeyByteMapToMapAdapter(map);
2870: }
2871:
2872: /**
2873: * Returns an adaption of a primitive map from
2874: * int keys to short values to a map.
2875: *
2876: * @param map
2877: * the primitive map to adapt.
2878: *
2879: * @return an adaption of the specified primitive
2880: * map to a map.
2881: */
2882: public static Map asObjects(IntKeyShortMap map) {
2883: return new IntKeyShortMapToMapAdapter(map);
2884: }
2885:
2886: /**
2887: * Returns an adaption of a primitive map from
2888: * int keys to int values to a map.
2889: *
2890: * @param map
2891: * the primitive map to adapt.
2892: *
2893: * @return an adaption of the specified primitive
2894: * map to a map.
2895: */
2896: public static Map asObjects(IntKeyIntMap map) {
2897: return new IntKeyIntMapToMapAdapter(map);
2898: }
2899:
2900: /**
2901: * Returns an adaption of a primitive map from
2902: * int keys to long values to a map.
2903: *
2904: * @param map
2905: * the primitive map to adapt.
2906: *
2907: * @return an adaption of the specified primitive
2908: * map to a map.
2909: */
2910: public static Map asObjects(IntKeyLongMap map) {
2911: return new IntKeyLongMapToMapAdapter(map);
2912: }
2913:
2914: /**
2915: * Returns an adaption of a primitive map from
2916: * int keys to float values to a map.
2917: *
2918: * @param map
2919: * the primitive map to adapt.
2920: *
2921: * @return an adaption of the specified primitive
2922: * map to a map.
2923: */
2924: public static Map asObjects(IntKeyFloatMap map) {
2925: return new IntKeyFloatMapToMapAdapter(map);
2926: }
2927:
2928: /**
2929: * Returns an adaption of a primitive map from
2930: * int keys to double values to a map.
2931: *
2932: * @param map
2933: * the primitive map to adapt.
2934: *
2935: * @return an adaption of the specified primitive
2936: * map to a map.
2937: */
2938: public static Map asObjects(IntKeyDoubleMap map) {
2939: return new IntKeyDoubleMapToMapAdapter(map);
2940: }
2941:
2942: /**
2943: * Returns an adaption of a primitive map from
2944: * long keys to boolean values to a map.
2945: *
2946: * @param map
2947: * the primitive map to adapt.
2948: *
2949: * @return an adaption of the specified primitive
2950: * map to a map.
2951: */
2952: public static Map asObjects(LongKeyBooleanMap map) {
2953: return new LongKeyBooleanMapToMapAdapter(map);
2954: }
2955:
2956: /**
2957: * Returns an adaption of a primitive map from
2958: * long keys to char values to a map.
2959: *
2960: * @param map
2961: * the primitive map to adapt.
2962: *
2963: * @return an adaption of the specified primitive
2964: * map to a map.
2965: */
2966: public static Map asObjects(LongKeyCharMap map) {
2967: return new LongKeyCharMapToMapAdapter(map);
2968: }
2969:
2970: /**
2971: * Returns an adaption of a primitive map from
2972: * long keys to byte values to a map.
2973: *
2974: * @param map
2975: * the primitive map to adapt.
2976: *
2977: * @return an adaption of the specified primitive
2978: * map to a map.
2979: */
2980: public static Map asObjects(LongKeyByteMap map) {
2981: return new LongKeyByteMapToMapAdapter(map);
2982: }
2983:
2984: /**
2985: * Returns an adaption of a primitive map from
2986: * long keys to short values to a map.
2987: *
2988: * @param map
2989: * the primitive map to adapt.
2990: *
2991: * @return an adaption of the specified primitive
2992: * map to a map.
2993: */
2994: public static Map asObjects(LongKeyShortMap map) {
2995: return new LongKeyShortMapToMapAdapter(map);
2996: }
2997:
2998: /**
2999: * Returns an adaption of a primitive map from
3000: * long keys to int values to a map.
3001: *
3002: * @param map
3003: * the primitive map to adapt.
3004: *
3005: * @return an adaption of the specified primitive
3006: * map to a map.
3007: */
3008: public static Map asObjects(LongKeyIntMap map) {
3009: return new LongKeyIntMapToMapAdapter(map);
3010: }
3011:
3012: /**
3013: * Returns an adaption of a primitive map from
3014: * long keys to long values to a map.
3015: *
3016: * @param map
3017: * the primitive map to adapt.
3018: *
3019: * @return an adaption of the specified primitive
3020: * map to a map.
3021: */
3022: public static Map asObjects(LongKeyLongMap map) {
3023: return new LongKeyLongMapToMapAdapter(map);
3024: }
3025:
3026: /**
3027: * Returns an adaption of a primitive map from
3028: * long keys to float values to a map.
3029: *
3030: * @param map
3031: * the primitive map to adapt.
3032: *
3033: * @return an adaption of the specified primitive
3034: * map to a map.
3035: */
3036: public static Map asObjects(LongKeyFloatMap map) {
3037: return new LongKeyFloatMapToMapAdapter(map);
3038: }
3039:
3040: /**
3041: * Returns an adaption of a primitive map from
3042: * long keys to double values to a map.
3043: *
3044: * @param map
3045: * the primitive map to adapt.
3046: *
3047: * @return an adaption of the specified primitive
3048: * map to a map.
3049: */
3050: public static Map asObjects(LongKeyDoubleMap map) {
3051: return new LongKeyDoubleMapToMapAdapter(map);
3052: }
3053:
3054: /**
3055: * Returns an adaption of a primitive map from
3056: * float keys to boolean values to a map.
3057: *
3058: * @param map
3059: * the primitive map to adapt.
3060: *
3061: * @return an adaption of the specified primitive
3062: * map to a map.
3063: */
3064: public static Map asObjects(FloatKeyBooleanMap map) {
3065: return new FloatKeyBooleanMapToMapAdapter(map);
3066: }
3067:
3068: /**
3069: * Returns an adaption of a primitive map from
3070: * float keys to char values to a map.
3071: *
3072: * @param map
3073: * the primitive map to adapt.
3074: *
3075: * @return an adaption of the specified primitive
3076: * map to a map.
3077: */
3078: public static Map asObjects(FloatKeyCharMap map) {
3079: return new FloatKeyCharMapToMapAdapter(map);
3080: }
3081:
3082: /**
3083: * Returns an adaption of a primitive map from
3084: * float keys to byte values to a map.
3085: *
3086: * @param map
3087: * the primitive map to adapt.
3088: *
3089: * @return an adaption of the specified primitive
3090: * map to a map.
3091: */
3092: public static Map asObjects(FloatKeyByteMap map) {
3093: return new FloatKeyByteMapToMapAdapter(map);
3094: }
3095:
3096: /**
3097: * Returns an adaption of a primitive map from
3098: * float keys to short values to a map.
3099: *
3100: * @param map
3101: * the primitive map to adapt.
3102: *
3103: * @return an adaption of the specified primitive
3104: * map to a map.
3105: */
3106: public static Map asObjects(FloatKeyShortMap map) {
3107: return new FloatKeyShortMapToMapAdapter(map);
3108: }
3109:
3110: /**
3111: * Returns an adaption of a primitive map from
3112: * float keys to int values to a map.
3113: *
3114: * @param map
3115: * the primitive map to adapt.
3116: *
3117: * @return an adaption of the specified primitive
3118: * map to a map.
3119: */
3120: public static Map asObjects(FloatKeyIntMap map) {
3121: return new FloatKeyIntMapToMapAdapter(map);
3122: }
3123:
3124: /**
3125: * Returns an adaption of a primitive map from
3126: * float keys to long values to a map.
3127: *
3128: * @param map
3129: * the primitive map to adapt.
3130: *
3131: * @return an adaption of the specified primitive
3132: * map to a map.
3133: */
3134: public static Map asObjects(FloatKeyLongMap map) {
3135: return new FloatKeyLongMapToMapAdapter(map);
3136: }
3137:
3138: /**
3139: * Returns an adaption of a primitive map from
3140: * float keys to float values to a map.
3141: *
3142: * @param map
3143: * the primitive map to adapt.
3144: *
3145: * @return an adaption of the specified primitive
3146: * map to a map.
3147: */
3148: public static Map asObjects(FloatKeyFloatMap map) {
3149: return new FloatKeyFloatMapToMapAdapter(map);
3150: }
3151:
3152: /**
3153: * Returns an adaption of a primitive map from
3154: * float keys to double values to a map.
3155: *
3156: * @param map
3157: * the primitive map to adapt.
3158: *
3159: * @return an adaption of the specified primitive
3160: * map to a map.
3161: */
3162: public static Map asObjects(FloatKeyDoubleMap map) {
3163: return new FloatKeyDoubleMapToMapAdapter(map);
3164: }
3165:
3166: /**
3167: * Returns an adaption of a primitive map from
3168: * double keys to boolean values to a map.
3169: *
3170: * @param map
3171: * the primitive map to adapt.
3172: *
3173: * @return an adaption of the specified primitive
3174: * map to a map.
3175: */
3176: public static Map asObjects(DoubleKeyBooleanMap map) {
3177: return new DoubleKeyBooleanMapToMapAdapter(map);
3178: }
3179:
3180: /**
3181: * Returns an adaption of a primitive map from
3182: * double keys to char values to a map.
3183: *
3184: * @param map
3185: * the primitive map to adapt.
3186: *
3187: * @return an adaption of the specified primitive
3188: * map to a map.
3189: */
3190: public static Map asObjects(DoubleKeyCharMap map) {
3191: return new DoubleKeyCharMapToMapAdapter(map);
3192: }
3193:
3194: /**
3195: * Returns an adaption of a primitive map from
3196: * double keys to byte values to a map.
3197: *
3198: * @param map
3199: * the primitive map to adapt.
3200: *
3201: * @return an adaption of the specified primitive
3202: * map to a map.
3203: */
3204: public static Map asObjects(DoubleKeyByteMap map) {
3205: return new DoubleKeyByteMapToMapAdapter(map);
3206: }
3207:
3208: /**
3209: * Returns an adaption of a primitive map from
3210: * double keys to short values to a map.
3211: *
3212: * @param map
3213: * the primitive map to adapt.
3214: *
3215: * @return an adaption of the specified primitive
3216: * map to a map.
3217: */
3218: public static Map asObjects(DoubleKeyShortMap map) {
3219: return new DoubleKeyShortMapToMapAdapter(map);
3220: }
3221:
3222: /**
3223: * Returns an adaption of a primitive map from
3224: * double keys to int values to a map.
3225: *
3226: * @param map
3227: * the primitive map to adapt.
3228: *
3229: * @return an adaption of the specified primitive
3230: * map to a map.
3231: */
3232: public static Map asObjects(DoubleKeyIntMap map) {
3233: return new DoubleKeyIntMapToMapAdapter(map);
3234: }
3235:
3236: /**
3237: * Returns an adaption of a primitive map from
3238: * double keys to long values to a map.
3239: *
3240: * @param map
3241: * the primitive map to adapt.
3242: *
3243: * @return an adaption of the specified primitive
3244: * map to a map.
3245: */
3246: public static Map asObjects(DoubleKeyLongMap map) {
3247: return new DoubleKeyLongMapToMapAdapter(map);
3248: }
3249:
3250: /**
3251: * Returns an adaption of a primitive map from
3252: * double keys to float values to a map.
3253: *
3254: * @param map
3255: * the primitive map to adapt.
3256: *
3257: * @return an adaption of the specified primitive
3258: * map to a map.
3259: */
3260: public static Map asObjects(DoubleKeyFloatMap map) {
3261: return new DoubleKeyFloatMapToMapAdapter(map);
3262: }
3263:
3264: /**
3265: * Returns an adaption of a primitive map from
3266: * double keys to double values to a map.
3267: *
3268: * @param map
3269: * the primitive map to adapt.
3270: *
3271: * @return an adaption of the specified primitive
3272: * map to a map.
3273: */
3274: public static Map asObjects(DoubleKeyDoubleMap map) {
3275: return new DoubleKeyDoubleMapToMapAdapter(map);
3276: }
3277:
3278: // ---------------------------------------------------------------
3279: // TKeyMap -> Map
3280: // ---------------------------------------------------------------
3281:
3282: /**
3283: * Returns an adaption of a primitive map of boolean keys
3284: * to a map.
3285: *
3286: * @param map
3287: * the primitive map to adapt.
3288: *
3289: * @return an adaption of the specified primitive map
3290: * to a map.
3291: */
3292: public static Map asObjects(BooleanKeyMap map) {
3293: return new BooleanKeyMapToMapAdapter(map);
3294: }
3295:
3296: /**
3297: * Returns an adaption of a primitive map of char keys
3298: * to a map.
3299: *
3300: * @param map
3301: * the primitive map to adapt.
3302: *
3303: * @return an adaption of the specified primitive map
3304: * to a map.
3305: */
3306: public static Map asObjects(CharKeyMap map) {
3307: return new CharKeyMapToMapAdapter(map);
3308: }
3309:
3310: /**
3311: * Returns an adaption of a primitive map of byte keys
3312: * to a map.
3313: *
3314: * @param map
3315: * the primitive map to adapt.
3316: *
3317: * @return an adaption of the specified primitive map
3318: * to a map.
3319: */
3320: public static Map asObjects(ByteKeyMap map) {
3321: return new ByteKeyMapToMapAdapter(map);
3322: }
3323:
3324: /**
3325: * Returns an adaption of a primitive map of short keys
3326: * to a map.
3327: *
3328: * @param map
3329: * the primitive map to adapt.
3330: *
3331: * @return an adaption of the specified primitive map
3332: * to a map.
3333: */
3334: public static Map asObjects(ShortKeyMap map) {
3335: return new ShortKeyMapToMapAdapter(map);
3336: }
3337:
3338: /**
3339: * Returns an adaption of a primitive map of int keys
3340: * to a map.
3341: *
3342: * @param map
3343: * the primitive map to adapt.
3344: *
3345: * @return an adaption of the specified primitive map
3346: * to a map.
3347: */
3348: public static Map asObjects(IntKeyMap map) {
3349: return new IntKeyMapToMapAdapter(map);
3350: }
3351:
3352: /**
3353: * Returns an adaption of a primitive map of long keys
3354: * to a map.
3355: *
3356: * @param map
3357: * the primitive map to adapt.
3358: *
3359: * @return an adaption of the specified primitive map
3360: * to a map.
3361: */
3362: public static Map asObjects(LongKeyMap map) {
3363: return new LongKeyMapToMapAdapter(map);
3364: }
3365:
3366: /**
3367: * Returns an adaption of a primitive map of float keys
3368: * to a map.
3369: *
3370: * @param map
3371: * the primitive map to adapt.
3372: *
3373: * @return an adaption of the specified primitive map
3374: * to a map.
3375: */
3376: public static Map asObjects(FloatKeyMap map) {
3377: return new FloatKeyMapToMapAdapter(map);
3378: }
3379:
3380: /**
3381: * Returns an adaption of a primitive map of double keys
3382: * to a map.
3383: *
3384: * @param map
3385: * the primitive map to adapt.
3386: *
3387: * @return an adaption of the specified primitive map
3388: * to a map.
3389: */
3390: public static Map asObjects(DoubleKeyMap map) {
3391: return new DoubleKeyMapToMapAdapter(map);
3392: }
3393:
3394: // ---------------------------------------------------------------
3395: // Map -> TKeyMap
3396: // ---------------------------------------------------------------
3397:
3398: /**
3399: * Returns an adaption of a map to a primitive map
3400: * from boolean keys to objects.
3401: *
3402: * @param map
3403: * the map to adapt to a primitive map.
3404: *
3405: * @return an adaption of the specified map to
3406: * a primitive map.
3407: */
3408: public static BooleanKeyMap asBooleanKeys(Map map) {
3409: return new MapToBooleanKeyMapAdapter(map);
3410: }
3411:
3412: /**
3413: * Returns an adaption of a map to a primitive map
3414: * from char keys to objects.
3415: *
3416: * @param map
3417: * the map to adapt to a primitive map.
3418: *
3419: * @return an adaption of the specified map to
3420: * a primitive map.
3421: */
3422: public static CharKeyMap asCharKeys(Map map) {
3423: return new MapToCharKeyMapAdapter(map);
3424: }
3425:
3426: /**
3427: * Returns an adaption of a map to a primitive map
3428: * from byte keys to objects.
3429: *
3430: * @param map
3431: * the map to adapt to a primitive map.
3432: *
3433: * @return an adaption of the specified map to
3434: * a primitive map.
3435: */
3436: public static ByteKeyMap asByteKeys(Map map) {
3437: return new MapToByteKeyMapAdapter(map);
3438: }
3439:
3440: /**
3441: * Returns an adaption of a map to a primitive map
3442: * from short keys to objects.
3443: *
3444: * @param map
3445: * the map to adapt to a primitive map.
3446: *
3447: * @return an adaption of the specified map to
3448: * a primitive map.
3449: */
3450: public static ShortKeyMap asShortKeys(Map map) {
3451: return new MapToShortKeyMapAdapter(map);
3452: }
3453:
3454: /**
3455: * Returns an adaption of a map to a primitive map
3456: * from int keys to objects.
3457: *
3458: * @param map
3459: * the map to adapt to a primitive map.
3460: *
3461: * @return an adaption of the specified map to
3462: * a primitive map.
3463: */
3464: public static IntKeyMap asIntKeys(Map map) {
3465: return new MapToIntKeyMapAdapter(map);
3466: }
3467:
3468: /**
3469: * Returns an adaption of a map to a primitive map
3470: * from long keys to objects.
3471: *
3472: * @param map
3473: * the map to adapt to a primitive map.
3474: *
3475: * @return an adaption of the specified map to
3476: * a primitive map.
3477: */
3478: public static LongKeyMap asLongKeys(Map map) {
3479: return new MapToLongKeyMapAdapter(map);
3480: }
3481:
3482: /**
3483: * Returns an adaption of a map to a primitive map
3484: * from float keys to objects.
3485: *
3486: * @param map
3487: * the map to adapt to a primitive map.
3488: *
3489: * @return an adaption of the specified map to
3490: * a primitive map.
3491: */
3492: public static FloatKeyMap asFloatKeys(Map map) {
3493: return new MapToFloatKeyMapAdapter(map);
3494: }
3495:
3496: /**
3497: * Returns an adaption of a map to a primitive map
3498: * from double keys to objects.
3499: *
3500: * @param map
3501: * the map to adapt to a primitive map.
3502: *
3503: * @return an adaption of the specified map to
3504: * a primitive map.
3505: */
3506: public static DoubleKeyMap asDoubleKeys(Map map) {
3507: return new MapToDoubleKeyMapAdapter(map);
3508: }
3509:
3510: // ---------------------------------------------------------------
3511: // ObjectKeyTMap -> Map
3512: // ---------------------------------------------------------------
3513:
3514: /**
3515: * Returns an adaption of a primitive map of object keys
3516: * and boolean values to a map.
3517: *
3518: * @param map
3519: * the primitive map to adapt.
3520: *
3521: * @return an adaption of the specified primitive map
3522: * to a map.
3523: *
3524: * @throws NullPointerException
3525: * if <tt>map</tt> is <tt>null</tt>.
3526: *
3527: * @since 1.1
3528: */
3529: public static Map asObjects(ObjectKeyBooleanMap map) {
3530: return new ObjectKeyBooleanMapToMapAdapter(map);
3531: }
3532:
3533: /**
3534: * Returns an adaption of a primitive map of object keys
3535: * and char values to a map.
3536: *
3537: * @param map
3538: * the primitive map to adapt.
3539: *
3540: * @return an adaption of the specified primitive map
3541: * to a map.
3542: *
3543: * @throws NullPointerException
3544: * if <tt>map</tt> is <tt>null</tt>.
3545: *
3546: * @since 1.1
3547: */
3548: public static Map asObjects(ObjectKeyCharMap map) {
3549: return new ObjectKeyCharMapToMapAdapter(map);
3550: }
3551:
3552: /**
3553: * Returns an adaption of a primitive map of object keys
3554: * and byte values to a map.
3555: *
3556: * @param map
3557: * the primitive map to adapt.
3558: *
3559: * @return an adaption of the specified primitive map
3560: * to a map.
3561: *
3562: * @throws NullPointerException
3563: * if <tt>map</tt> is <tt>null</tt>.
3564: *
3565: * @since 1.1
3566: */
3567: public static Map asObjects(ObjectKeyByteMap map) {
3568: return new ObjectKeyByteMapToMapAdapter(map);
3569: }
3570:
3571: /**
3572: * Returns an adaption of a primitive map of object keys
3573: * and short values to a map.
3574: *
3575: * @param map
3576: * the primitive map to adapt.
3577: *
3578: * @return an adaption of the specified primitive map
3579: * to a map.
3580: *
3581: * @throws NullPointerException
3582: * if <tt>map</tt> is <tt>null</tt>.
3583: *
3584: * @since 1.1
3585: */
3586: public static Map asObjects(ObjectKeyShortMap map) {
3587: return new ObjectKeyShortMapToMapAdapter(map);
3588: }
3589:
3590: /**
3591: * Returns an adaption of a primitive map of object keys
3592: * and int values to a map.
3593: *
3594: * @param map
3595: * the primitive map to adapt.
3596: *
3597: * @return an adaption of the specified primitive map
3598: * to a map.
3599: *
3600: * @throws NullPointerException
3601: * if <tt>map</tt> is <tt>null</tt>.
3602: *
3603: * @since 1.1
3604: */
3605: public static Map asObjects(ObjectKeyIntMap map) {
3606: return new ObjectKeyIntMapToMapAdapter(map);
3607: }
3608:
3609: /**
3610: * Returns an adaption of a primitive map of object keys
3611: * and long values to a map.
3612: *
3613: * @param map
3614: * the primitive map to adapt.
3615: *
3616: * @return an adaption of the specified primitive map
3617: * to a map.
3618: *
3619: * @throws NullPointerException
3620: * if <tt>map</tt> is <tt>null</tt>.
3621: *
3622: * @since 1.1
3623: */
3624: public static Map asObjects(ObjectKeyLongMap map) {
3625: return new ObjectKeyLongMapToMapAdapter(map);
3626: }
3627:
3628: /**
3629: * Returns an adaption of a primitive map of object keys
3630: * and float values to a map.
3631: *
3632: * @param map
3633: * the primitive map to adapt.
3634: *
3635: * @return an adaption of the specified primitive map
3636: * to a map.
3637: *
3638: * @throws NullPointerException
3639: * if <tt>map</tt> is <tt>null</tt>.
3640: *
3641: * @since 1.1
3642: */
3643: public static Map asObjects(ObjectKeyFloatMap map) {
3644: return new ObjectKeyFloatMapToMapAdapter(map);
3645: }
3646:
3647: /**
3648: * Returns an adaption of a primitive map of object keys
3649: * and double values to a map.
3650: *
3651: * @param map
3652: * the primitive map to adapt.
3653: *
3654: * @return an adaption of the specified primitive map
3655: * to a map.
3656: *
3657: * @throws NullPointerException
3658: * if <tt>map</tt> is <tt>null</tt>.
3659: *
3660: * @since 1.1
3661: */
3662: public static Map asObjects(ObjectKeyDoubleMap map) {
3663: return new ObjectKeyDoubleMapToMapAdapter(map);
3664: }
3665:
3666: // ---------------------------------------------------------------
3667: // Map -> ObjectKeyTMap
3668: // ---------------------------------------------------------------
3669:
3670: /**
3671: * Returns an adaption of a map to a primitive map
3672: * from object keys to boolean values.
3673: *
3674: * @param map
3675: * the map to adapt to a primitive map.
3676: *
3677: * @return an adaption of the specified map to
3678: * a primitive map.
3679: *
3680: * @throws NullPointerException
3681: * if <tt>map</tt> is <tt>null</tt>.
3682: *
3683: * @since 1.1
3684: */
3685: public static ObjectKeyBooleanMap asObjectKeyBooleans(Map map) {
3686: return new MapToObjectKeyBooleanMapAdapter(map);
3687: }
3688:
3689: /**
3690: * Returns an adaption of a map to a primitive map
3691: * from object keys to char values.
3692: *
3693: * @param map
3694: * the map to adapt to a primitive map.
3695: *
3696: * @return an adaption of the specified map to
3697: * a primitive map.
3698: *
3699: * @throws NullPointerException
3700: * if <tt>map</tt> is <tt>null</tt>.
3701: *
3702: * @since 1.1
3703: */
3704: public static ObjectKeyCharMap asObjectKeyChars(Map map) {
3705: return new MapToObjectKeyCharMapAdapter(map);
3706: }
3707:
3708: /**
3709: * Returns an adaption of a map to a primitive map
3710: * from object keys to byte values.
3711: *
3712: * @param map
3713: * the map to adapt to a primitive map.
3714: *
3715: * @return an adaption of the specified map to
3716: * a primitive map.
3717: *
3718: * @throws NullPointerException
3719: * if <tt>map</tt> is <tt>null</tt>.
3720: *
3721: * @since 1.1
3722: */
3723: public static ObjectKeyByteMap asObjectKeyBytes(Map map) {
3724: return new MapToObjectKeyByteMapAdapter(map);
3725: }
3726:
3727: /**
3728: * Returns an adaption of a map to a primitive map
3729: * from object keys to short values.
3730: *
3731: * @param map
3732: * the map to adapt to a primitive map.
3733: *
3734: * @return an adaption of the specified map to
3735: * a primitive map.
3736: *
3737: * @throws NullPointerException
3738: * if <tt>map</tt> is <tt>null</tt>.
3739: *
3740: * @since 1.1
3741: */
3742: public static ObjectKeyShortMap asObjectKeyShorts(Map map) {
3743: return new MapToObjectKeyShortMapAdapter(map);
3744: }
3745:
3746: /**
3747: * Returns an adaption of a map to a primitive map
3748: * from object keys to int values.
3749: *
3750: * @param map
3751: * the map to adapt to a primitive map.
3752: *
3753: * @return an adaption of the specified map to
3754: * a primitive map.
3755: *
3756: * @throws NullPointerException
3757: * if <tt>map</tt> is <tt>null</tt>.
3758: *
3759: * @since 1.1
3760: */
3761: public static ObjectKeyIntMap asObjectKeyInts(Map map) {
3762: return new MapToObjectKeyIntMapAdapter(map);
3763: }
3764:
3765: /**
3766: * Returns an adaption of a map to a primitive map
3767: * from object keys to long values.
3768: *
3769: * @param map
3770: * the map to adapt to a primitive map.
3771: *
3772: * @return an adaption of the specified map to
3773: * a primitive map.
3774: *
3775: * @throws NullPointerException
3776: * if <tt>map</tt> is <tt>null</tt>.
3777: *
3778: * @since 1.1
3779: */
3780: public static ObjectKeyLongMap asObjectKeyLongs(Map map) {
3781: return new MapToObjectKeyLongMapAdapter(map);
3782: }
3783:
3784: /**
3785: * Returns an adaption of a map to a primitive map
3786: * from object keys to float values.
3787: *
3788: * @param map
3789: * the map to adapt to a primitive map.
3790: *
3791: * @return an adaption of the specified map to
3792: * a primitive map.
3793: *
3794: * @throws NullPointerException
3795: * if <tt>map</tt> is <tt>null</tt>.
3796: *
3797: * @since 1.1
3798: */
3799: public static ObjectKeyFloatMap asObjectKeyFloats(Map map) {
3800: return new MapToObjectKeyFloatMapAdapter(map);
3801: }
3802:
3803: /**
3804: * Returns an adaption of a map to a primitive map
3805: * from object keys to double values.
3806: *
3807: * @param map
3808: * the map to adapt to a primitive map.
3809: *
3810: * @return an adaption of the specified map to
3811: * a primitive map.
3812: *
3813: * @throws NullPointerException
3814: * if <tt>map</tt> is <tt>null</tt>.
3815: *
3816: * @since 1.1
3817: */
3818: public static ObjectKeyDoubleMap asObjectKeyDoubles(Map map) {
3819: return new MapToObjectKeyDoubleMapAdapter(map);
3820: }
3821:
3822: // ---------------------------------------------------------------
3823: // isTAdaptable(Collection c)
3824: // ---------------------------------------------------------------
3825:
3826: /**
3827: * Indicates whether a specified collection is adaptable
3828: * to a primitive collection of boolean values. For a
3829: * collection to be adaptable it can only contain
3830: * values of class {@link Boolean Boolean} and no
3831: * <tt>null</tt> values.
3832: *
3833: * @param collection
3834: * the collection to examine.
3835: *
3836: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
3837: * {@link BooleanCollection BooleanCollection};
3838: * returns <tt>false</tt> otherwise.
3839: *
3840: * @throws NullPointerException
3841: * if <tt>collection</tt> is <tt>null</tt>.
3842: *
3843: * @see #asBooleans(Collection)
3844: * @see #asBooleans(List)
3845: * @see #asBooleans(Set)
3846: */
3847: public static boolean isBooleanAdaptable(Collection collection) {
3848: for (Iterator i = collection.iterator(); i.hasNext();)
3849: if (!(i.next() instanceof Boolean))
3850: return false;
3851: return true;
3852: }
3853:
3854: /**
3855: * Indicates whether a specified collection is adaptable
3856: * to a primitive collection of char values. For a
3857: * collection to be adaptable it can only contain
3858: * values of class {@link Character Character} and no
3859: * <tt>null</tt> values.
3860: *
3861: * @param collection
3862: * the collection to examine.
3863: *
3864: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
3865: * {@link CharCollection CharCollection};
3866: * returns <tt>false</tt> otherwise.
3867: *
3868: * @throws NullPointerException
3869: * if <tt>collection</tt> is <tt>null</tt>.
3870: *
3871: * @see #asChars(Collection)
3872: * @see #asChars(List)
3873: * @see #asChars(Set)
3874: */
3875: public static boolean isCharAdaptable(Collection collection) {
3876: for (Iterator i = collection.iterator(); i.hasNext();)
3877: if (!(i.next() instanceof Character))
3878: return false;
3879: return true;
3880: }
3881:
3882: /**
3883: * Indicates whether a specified collection is adaptable
3884: * to a primitive collection of byte values. For a
3885: * collection to be adaptable it can only contain
3886: * values of class {@link Byte Byte} and no
3887: * <tt>null</tt> values.
3888: *
3889: * @param collection
3890: * the collection to examine.
3891: *
3892: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
3893: * {@link ByteCollection ByteCollection};
3894: * returns <tt>false</tt> otherwise.
3895: *
3896: * @throws NullPointerException
3897: * if <tt>collection</tt> is <tt>null</tt>.
3898: *
3899: * @see #asBytes(Collection)
3900: * @see #asBytes(List)
3901: * @see #asBytes(Set)
3902: */
3903: public static boolean isByteAdaptable(Collection collection) {
3904: for (Iterator i = collection.iterator(); i.hasNext();)
3905: if (!(i.next() instanceof Byte))
3906: return false;
3907: return true;
3908: }
3909:
3910: /**
3911: * Indicates whether a specified collection is adaptable
3912: * to a primitive collection of short values. For a
3913: * collection to be adaptable it can only contain
3914: * values of class {@link Short Short} and no
3915: * <tt>null</tt> values.
3916: *
3917: * @param collection
3918: * the collection to examine.
3919: *
3920: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
3921: * {@link ShortCollection ShortCollection};
3922: * returns <tt>false</tt> otherwise.
3923: *
3924: * @throws NullPointerException
3925: * if <tt>collection</tt> is <tt>null</tt>.
3926: *
3927: * @see #asShorts(Collection)
3928: * @see #asShorts(List)
3929: * @see #asShorts(Set)
3930: */
3931: public static boolean isShortAdaptable(Collection collection) {
3932: for (Iterator i = collection.iterator(); i.hasNext();)
3933: if (!(i.next() instanceof Short))
3934: return false;
3935: return true;
3936: }
3937:
3938: /**
3939: * Indicates whether a specified collection is adaptable
3940: * to a primitive collection of int values. For a
3941: * collection to be adaptable it can only contain
3942: * values of class {@link Integer Integer} and no
3943: * <tt>null</tt> values.
3944: *
3945: * @param collection
3946: * the collection to examine.
3947: *
3948: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
3949: * {@link IntCollection IntCollection};
3950: * returns <tt>false</tt> otherwise.
3951: *
3952: * @throws NullPointerException
3953: * if <tt>collection</tt> is <tt>null</tt>.
3954: *
3955: * @see #asInts(Collection)
3956: * @see #asInts(List)
3957: * @see #asInts(Set)
3958: */
3959: public static boolean isIntAdaptable(Collection collection) {
3960: for (Iterator i = collection.iterator(); i.hasNext();)
3961: if (!(i.next() instanceof Integer))
3962: return false;
3963: return true;
3964: }
3965:
3966: /**
3967: * Indicates whether a specified collection is adaptable
3968: * to a primitive collection of long values. For a
3969: * collection to be adaptable it can only contain
3970: * values of class {@link Long Long} and no
3971: * <tt>null</tt> values.
3972: *
3973: * @param collection
3974: * the collection to examine.
3975: *
3976: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
3977: * {@link LongCollection LongCollection};
3978: * returns <tt>false</tt> otherwise.
3979: *
3980: * @throws NullPointerException
3981: * if <tt>collection</tt> is <tt>null</tt>.
3982: *
3983: * @see #asLongs(Collection)
3984: * @see #asLongs(List)
3985: * @see #asLongs(Set)
3986: */
3987: public static boolean isLongAdaptable(Collection collection) {
3988: for (Iterator i = collection.iterator(); i.hasNext();)
3989: if (!(i.next() instanceof Long))
3990: return false;
3991: return true;
3992: }
3993:
3994: /**
3995: * Indicates whether a specified collection is adaptable
3996: * to a primitive collection of float values. For a
3997: * collection to be adaptable it can only contain
3998: * values of class {@link Float Float} and no
3999: * <tt>null</tt> values.
4000: *
4001: * @param collection
4002: * the collection to examine.
4003: *
4004: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
4005: * {@link FloatCollection FloatCollection};
4006: * returns <tt>false</tt> otherwise.
4007: *
4008: * @throws NullPointerException
4009: * if <tt>collection</tt> is <tt>null</tt>.
4010: *
4011: * @see #asFloats(Collection)
4012: * @see #asFloats(List)
4013: * @see #asFloats(Set)
4014: */
4015: public static boolean isFloatAdaptable(Collection collection) {
4016: for (Iterator i = collection.iterator(); i.hasNext();)
4017: if (!(i.next() instanceof Float))
4018: return false;
4019: return true;
4020: }
4021:
4022: /**
4023: * Indicates whether a specified collection is adaptable
4024: * to a primitive collection of double values. For a
4025: * collection to be adaptable it can only contain
4026: * values of class {@link Double Double} and no
4027: * <tt>null</tt> values.
4028: *
4029: * @param collection
4030: * the collection to examine.
4031: *
4032: * @return <tt>true</tt> if <tt>collection</tt> is adaptable to a
4033: * {@link DoubleCollection DoubleCollection};
4034: * returns <tt>false</tt> otherwise.
4035: *
4036: * @throws NullPointerException
4037: * if <tt>collection</tt> is <tt>null</tt>.
4038: *
4039: * @see #asDoubles(Collection)
4040: * @see #asDoubles(List)
4041: * @see #asDoubles(Set)
4042: */
4043: public static boolean isDoubleAdaptable(Collection collection) {
4044: for (Iterator i = collection.iterator(); i.hasNext();)
4045: if (!(i.next() instanceof Double))
4046: return false;
4047: return true;
4048: }
4049:
4050: // ---------------------------------------------------------------
4051: // isTKeyAdaptable(Map map)
4052: // ---------------------------------------------------------------
4053:
4054: /**
4055: * Indicates whether a specified map is adaptable
4056: * to a primitive map with boolean keys. For a
4057: * map to be adaptable it can only contain
4058: * keys of class {@link Boolean Boolean} and no
4059: * <tt>null</tt> keys.
4060: *
4061: * @param map
4062: * the map to examine.
4063: *
4064: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4065: * {@link BooleanKeyMap BooleanKeyMap};
4066: * returns <tt>false</tt> otherwise.
4067: *
4068: * @throws NullPointerException
4069: * if <tt>map</tt> is <tt>null</tt>.
4070: *
4071: * @see #asBooleanKeys(Map)
4072: */
4073: public static boolean isBooleanKeyAdaptable(Map map) {
4074: return isBooleanAdaptable(map.keySet());
4075: }
4076:
4077: /**
4078: * Indicates whether a specified map is adaptable
4079: * to a primitive map with char keys. For a
4080: * map to be adaptable it can only contain
4081: * keys of class {@link Character Character} and no
4082: * <tt>null</tt> keys.
4083: *
4084: * @param map
4085: * the map to examine.
4086: *
4087: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4088: * {@link CharKeyMap CharKeyMap};
4089: * returns <tt>false</tt> otherwise.
4090: *
4091: * @throws NullPointerException
4092: * if <tt>map</tt> is <tt>null</tt>.
4093: *
4094: * @see #asCharKeys(Map)
4095: */
4096: public static boolean isCharKeyAdaptable(Map map) {
4097: return isCharAdaptable(map.keySet());
4098: }
4099:
4100: /**
4101: * Indicates whether a specified map is adaptable
4102: * to a primitive map with byte keys. For a
4103: * map to be adaptable it can only contain
4104: * keys of class {@link Byte Byte} and no
4105: * <tt>null</tt> keys.
4106: *
4107: * @param map
4108: * the map to examine.
4109: *
4110: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4111: * {@link ByteKeyMap ByteKeyMap};
4112: * returns <tt>false</tt> otherwise.
4113: *
4114: * @throws NullPointerException
4115: * if <tt>map</tt> is <tt>null</tt>.
4116: *
4117: * @see #asByteKeys(Map)
4118: */
4119: public static boolean isByteKeyAdaptable(Map map) {
4120: return isByteAdaptable(map.keySet());
4121: }
4122:
4123: /**
4124: * Indicates whether a specified map is adaptable
4125: * to a primitive map with short keys. For a
4126: * map to be adaptable it can only contain
4127: * keys of class {@link Short Short} and no
4128: * <tt>null</tt> keys.
4129: *
4130: * @param map
4131: * the map to examine.
4132: *
4133: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4134: * {@link ShortKeyMap ShortKeyMap};
4135: * returns <tt>false</tt> otherwise.
4136: *
4137: * @throws NullPointerException
4138: * if <tt>map</tt> is <tt>null</tt>.
4139: *
4140: * @see #asShortKeys(Map)
4141: */
4142: public static boolean isShortKeyAdaptable(Map map) {
4143: return isShortAdaptable(map.keySet());
4144: }
4145:
4146: /**
4147: * Indicates whether a specified map is adaptable
4148: * to a primitive map with int keys. For a
4149: * map to be adaptable it can only contain
4150: * keys of class {@link Integer Integer} and no
4151: * <tt>null</tt> keys.
4152: *
4153: * @param map
4154: * the map to examine.
4155: *
4156: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4157: * {@link IntKeyMap IntKeyMap};
4158: * returns <tt>false</tt> otherwise.
4159: *
4160: * @throws NullPointerException
4161: * if <tt>map</tt> is <tt>null</tt>.
4162: *
4163: * @see #asIntKeys(Map)
4164: */
4165: public static boolean isIntKeyAdaptable(Map map) {
4166: return isIntAdaptable(map.keySet());
4167: }
4168:
4169: /**
4170: * Indicates whether a specified map is adaptable
4171: * to a primitive map with long keys. For a
4172: * map to be adaptable it can only contain
4173: * keys of class {@link Long Long} and no
4174: * <tt>null</tt> keys.
4175: *
4176: * @param map
4177: * the map to examine.
4178: *
4179: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4180: * {@link LongKeyMap LongKeyMap};
4181: * returns <tt>false</tt> otherwise.
4182: *
4183: * @throws NullPointerException
4184: * if <tt>map</tt> is <tt>null</tt>.
4185: *
4186: * @see #asLongKeys(Map)
4187: */
4188: public static boolean isLongKeyAdaptable(Map map) {
4189: return isLongAdaptable(map.keySet());
4190: }
4191:
4192: /**
4193: * Indicates whether a specified map is adaptable
4194: * to a primitive map with float keys. For a
4195: * map to be adaptable it can only contain
4196: * keys of class {@link Float Float} and no
4197: * <tt>null</tt> keys.
4198: *
4199: * @param map
4200: * the map to examine.
4201: *
4202: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4203: * {@link FloatKeyMap FloatKeyMap};
4204: * returns <tt>false</tt> otherwise.
4205: *
4206: * @throws NullPointerException
4207: * if <tt>map</tt> is <tt>null</tt>.
4208: *
4209: * @see #asFloatKeys(Map)
4210: */
4211: public static boolean isFloatKeyAdaptable(Map map) {
4212: return isFloatAdaptable(map.keySet());
4213: }
4214:
4215: /**
4216: * Indicates whether a specified map is adaptable
4217: * to a primitive map with double keys. For a
4218: * map to be adaptable it can only contain
4219: * keys of class {@link Double Double} and no
4220: * <tt>null</tt> keys.
4221: *
4222: * @param map
4223: * the map to examine.
4224: *
4225: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4226: * {@link DoubleKeyMap DoubleKeyMap};
4227: * returns <tt>false</tt> otherwise.
4228: *
4229: * @throws NullPointerException
4230: * if <tt>map</tt> is <tt>null</tt>.
4231: *
4232: * @see #asDoubleKeys(Map)
4233: */
4234: public static boolean isDoubleKeyAdaptable(Map map) {
4235: return isDoubleAdaptable(map.keySet());
4236: }
4237:
4238: // ---------------------------------------------------------------
4239: // isTKeySAdaptable(Map map)
4240: // ---------------------------------------------------------------
4241:
4242: /**
4243: * Indicates whether a specified map is adaptable
4244: * to a primitive map with boolean keys and boolean values. For a
4245: * map to be adaptable it can only contain
4246: * keys of class {@link Boolean Boolean},
4247: * values of class {@link Boolean Boolean},
4248: * and no <tt>null</tt> keys or <tt>null</tt> values.
4249: *
4250: * @param map
4251: * the map to examine.
4252: *
4253: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4254: * {@link BooleanKeyBooleanMap BooleanKeyBooleanMap};
4255: * returns <tt>false</tt> otherwise.
4256: *
4257: * @throws NullPointerException
4258: * if <tt>map</tt> is <tt>null</tt>.
4259: *
4260: * @see #asBooleanKeyBooleans(Map)
4261: */
4262: public static boolean isBooleanKeyBooleanAdaptable(Map map) {
4263: return isBooleanAdaptable(map.keySet())
4264: && isBooleanAdaptable(map.values());
4265: }
4266:
4267: /**
4268: * Indicates whether a specified map is adaptable
4269: * to a primitive map with boolean keys and char values. For a
4270: * map to be adaptable it can only contain
4271: * keys of class {@link Boolean Boolean},
4272: * values of class {@link Character Character},
4273: * and no <tt>null</tt> keys or <tt>null</tt> values.
4274: *
4275: * @param map
4276: * the map to examine.
4277: *
4278: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4279: * {@link BooleanKeyCharMap BooleanKeyCharMap};
4280: * returns <tt>false</tt> otherwise.
4281: *
4282: * @throws NullPointerException
4283: * if <tt>map</tt> is <tt>null</tt>.
4284: *
4285: * @see #asBooleanKeyChars(Map)
4286: */
4287: public static boolean isBooleanKeyCharAdaptable(Map map) {
4288: return isBooleanAdaptable(map.keySet())
4289: && isCharAdaptable(map.values());
4290: }
4291:
4292: /**
4293: * Indicates whether a specified map is adaptable
4294: * to a primitive map with boolean keys and byte values. For a
4295: * map to be adaptable it can only contain
4296: * keys of class {@link Boolean Boolean},
4297: * values of class {@link Byte Byte},
4298: * and no <tt>null</tt> keys or <tt>null</tt> values.
4299: *
4300: * @param map
4301: * the map to examine.
4302: *
4303: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4304: * {@link BooleanKeyByteMap BooleanKeyByteMap};
4305: * returns <tt>false</tt> otherwise.
4306: *
4307: * @throws NullPointerException
4308: * if <tt>map</tt> is <tt>null</tt>.
4309: *
4310: * @see #asBooleanKeyBytes(Map)
4311: */
4312: public static boolean isBooleanKeyByteAdaptable(Map map) {
4313: return isBooleanAdaptable(map.keySet())
4314: && isByteAdaptable(map.values());
4315: }
4316:
4317: /**
4318: * Indicates whether a specified map is adaptable
4319: * to a primitive map with boolean keys and short values. For a
4320: * map to be adaptable it can only contain
4321: * keys of class {@link Boolean Boolean},
4322: * values of class {@link Short Short},
4323: * and no <tt>null</tt> keys or <tt>null</tt> values.
4324: *
4325: * @param map
4326: * the map to examine.
4327: *
4328: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4329: * {@link BooleanKeyShortMap BooleanKeyShortMap};
4330: * returns <tt>false</tt> otherwise.
4331: *
4332: * @throws NullPointerException
4333: * if <tt>map</tt> is <tt>null</tt>.
4334: *
4335: * @see #asBooleanKeyShorts(Map)
4336: */
4337: public static boolean isBooleanKeyShortAdaptable(Map map) {
4338: return isBooleanAdaptable(map.keySet())
4339: && isShortAdaptable(map.values());
4340: }
4341:
4342: /**
4343: * Indicates whether a specified map is adaptable
4344: * to a primitive map with boolean keys and int values. For a
4345: * map to be adaptable it can only contain
4346: * keys of class {@link Boolean Boolean},
4347: * values of class {@link Integer Integer},
4348: * and no <tt>null</tt> keys or <tt>null</tt> values.
4349: *
4350: * @param map
4351: * the map to examine.
4352: *
4353: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4354: * {@link BooleanKeyIntMap BooleanKeyIntMap};
4355: * returns <tt>false</tt> otherwise.
4356: *
4357: * @throws NullPointerException
4358: * if <tt>map</tt> is <tt>null</tt>.
4359: *
4360: * @see #asBooleanKeyInts(Map)
4361: */
4362: public static boolean isBooleanKeyIntAdaptable(Map map) {
4363: return isBooleanAdaptable(map.keySet())
4364: && isIntAdaptable(map.values());
4365: }
4366:
4367: /**
4368: * Indicates whether a specified map is adaptable
4369: * to a primitive map with boolean keys and long values. For a
4370: * map to be adaptable it can only contain
4371: * keys of class {@link Boolean Boolean},
4372: * values of class {@link Long Long},
4373: * and no <tt>null</tt> keys or <tt>null</tt> values.
4374: *
4375: * @param map
4376: * the map to examine.
4377: *
4378: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4379: * {@link BooleanKeyLongMap BooleanKeyLongMap};
4380: * returns <tt>false</tt> otherwise.
4381: *
4382: * @throws NullPointerException
4383: * if <tt>map</tt> is <tt>null</tt>.
4384: *
4385: * @see #asBooleanKeyLongs(Map)
4386: */
4387: public static boolean isBooleanKeyLongAdaptable(Map map) {
4388: return isBooleanAdaptable(map.keySet())
4389: && isLongAdaptable(map.values());
4390: }
4391:
4392: /**
4393: * Indicates whether a specified map is adaptable
4394: * to a primitive map with boolean keys and float values. For a
4395: * map to be adaptable it can only contain
4396: * keys of class {@link Boolean Boolean},
4397: * values of class {@link Float Float},
4398: * and no <tt>null</tt> keys or <tt>null</tt> values.
4399: *
4400: * @param map
4401: * the map to examine.
4402: *
4403: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4404: * {@link BooleanKeyFloatMap BooleanKeyFloatMap};
4405: * returns <tt>false</tt> otherwise.
4406: *
4407: * @throws NullPointerException
4408: * if <tt>map</tt> is <tt>null</tt>.
4409: *
4410: * @see #asBooleanKeyFloats(Map)
4411: */
4412: public static boolean isBooleanKeyFloatAdaptable(Map map) {
4413: return isBooleanAdaptable(map.keySet())
4414: && isFloatAdaptable(map.values());
4415: }
4416:
4417: /**
4418: * Indicates whether a specified map is adaptable
4419: * to a primitive map with boolean keys and double values. For a
4420: * map to be adaptable it can only contain
4421: * keys of class {@link Boolean Boolean},
4422: * values of class {@link Double Double},
4423: * and no <tt>null</tt> keys or <tt>null</tt> values.
4424: *
4425: * @param map
4426: * the map to examine.
4427: *
4428: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4429: * {@link BooleanKeyDoubleMap BooleanKeyDoubleMap};
4430: * returns <tt>false</tt> otherwise.
4431: *
4432: * @throws NullPointerException
4433: * if <tt>map</tt> is <tt>null</tt>.
4434: *
4435: * @see #asBooleanKeyDoubles(Map)
4436: */
4437: public static boolean isBooleanKeyDoubleAdaptable(Map map) {
4438: return isBooleanAdaptable(map.keySet())
4439: && isDoubleAdaptable(map.values());
4440: }
4441:
4442: /**
4443: * Indicates whether a specified map is adaptable
4444: * to a primitive map with char keys and boolean values. For a
4445: * map to be adaptable it can only contain
4446: * keys of class {@link Character Character},
4447: * values of class {@link Boolean Boolean},
4448: * and no <tt>null</tt> keys or <tt>null</tt> values.
4449: *
4450: * @param map
4451: * the map to examine.
4452: *
4453: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4454: * {@link CharKeyBooleanMap CharKeyBooleanMap};
4455: * returns <tt>false</tt> otherwise.
4456: *
4457: * @throws NullPointerException
4458: * if <tt>map</tt> is <tt>null</tt>.
4459: *
4460: * @see #asCharKeyBooleans(Map)
4461: */
4462: public static boolean isCharKeyBooleanAdaptable(Map map) {
4463: return isCharAdaptable(map.keySet())
4464: && isBooleanAdaptable(map.values());
4465: }
4466:
4467: /**
4468: * Indicates whether a specified map is adaptable
4469: * to a primitive map with char keys and char values. For a
4470: * map to be adaptable it can only contain
4471: * keys of class {@link Character Character},
4472: * values of class {@link Character Character},
4473: * and no <tt>null</tt> keys or <tt>null</tt> values.
4474: *
4475: * @param map
4476: * the map to examine.
4477: *
4478: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4479: * {@link CharKeyCharMap CharKeyCharMap};
4480: * returns <tt>false</tt> otherwise.
4481: *
4482: * @throws NullPointerException
4483: * if <tt>map</tt> is <tt>null</tt>.
4484: *
4485: * @see #asCharKeyChars(Map)
4486: */
4487: public static boolean isCharKeyCharAdaptable(Map map) {
4488: return isCharAdaptable(map.keySet())
4489: && isCharAdaptable(map.values());
4490: }
4491:
4492: /**
4493: * Indicates whether a specified map is adaptable
4494: * to a primitive map with char keys and byte values. For a
4495: * map to be adaptable it can only contain
4496: * keys of class {@link Character Character},
4497: * values of class {@link Byte Byte},
4498: * and no <tt>null</tt> keys or <tt>null</tt> values.
4499: *
4500: * @param map
4501: * the map to examine.
4502: *
4503: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4504: * {@link CharKeyByteMap CharKeyByteMap};
4505: * returns <tt>false</tt> otherwise.
4506: *
4507: * @throws NullPointerException
4508: * if <tt>map</tt> is <tt>null</tt>.
4509: *
4510: * @see #asCharKeyBytes(Map)
4511: */
4512: public static boolean isCharKeyByteAdaptable(Map map) {
4513: return isCharAdaptable(map.keySet())
4514: && isByteAdaptable(map.values());
4515: }
4516:
4517: /**
4518: * Indicates whether a specified map is adaptable
4519: * to a primitive map with char keys and short values. For a
4520: * map to be adaptable it can only contain
4521: * keys of class {@link Character Character},
4522: * values of class {@link Short Short},
4523: * and no <tt>null</tt> keys or <tt>null</tt> values.
4524: *
4525: * @param map
4526: * the map to examine.
4527: *
4528: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4529: * {@link CharKeyShortMap CharKeyShortMap};
4530: * returns <tt>false</tt> otherwise.
4531: *
4532: * @throws NullPointerException
4533: * if <tt>map</tt> is <tt>null</tt>.
4534: *
4535: * @see #asCharKeyShorts(Map)
4536: */
4537: public static boolean isCharKeyShortAdaptable(Map map) {
4538: return isCharAdaptable(map.keySet())
4539: && isShortAdaptable(map.values());
4540: }
4541:
4542: /**
4543: * Indicates whether a specified map is adaptable
4544: * to a primitive map with char keys and int values. For a
4545: * map to be adaptable it can only contain
4546: * keys of class {@link Character Character},
4547: * values of class {@link Integer Integer},
4548: * and no <tt>null</tt> keys or <tt>null</tt> values.
4549: *
4550: * @param map
4551: * the map to examine.
4552: *
4553: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4554: * {@link CharKeyIntMap CharKeyIntMap};
4555: * returns <tt>false</tt> otherwise.
4556: *
4557: * @throws NullPointerException
4558: * if <tt>map</tt> is <tt>null</tt>.
4559: *
4560: * @see #asCharKeyInts(Map)
4561: */
4562: public static boolean isCharKeyIntAdaptable(Map map) {
4563: return isCharAdaptable(map.keySet())
4564: && isIntAdaptable(map.values());
4565: }
4566:
4567: /**
4568: * Indicates whether a specified map is adaptable
4569: * to a primitive map with char keys and long values. For a
4570: * map to be adaptable it can only contain
4571: * keys of class {@link Character Character},
4572: * values of class {@link Long Long},
4573: * and no <tt>null</tt> keys or <tt>null</tt> values.
4574: *
4575: * @param map
4576: * the map to examine.
4577: *
4578: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4579: * {@link CharKeyLongMap CharKeyLongMap};
4580: * returns <tt>false</tt> otherwise.
4581: *
4582: * @throws NullPointerException
4583: * if <tt>map</tt> is <tt>null</tt>.
4584: *
4585: * @see #asCharKeyLongs(Map)
4586: */
4587: public static boolean isCharKeyLongAdaptable(Map map) {
4588: return isCharAdaptable(map.keySet())
4589: && isLongAdaptable(map.values());
4590: }
4591:
4592: /**
4593: * Indicates whether a specified map is adaptable
4594: * to a primitive map with char keys and float values. For a
4595: * map to be adaptable it can only contain
4596: * keys of class {@link Character Character},
4597: * values of class {@link Float Float},
4598: * and no <tt>null</tt> keys or <tt>null</tt> values.
4599: *
4600: * @param map
4601: * the map to examine.
4602: *
4603: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4604: * {@link CharKeyFloatMap CharKeyFloatMap};
4605: * returns <tt>false</tt> otherwise.
4606: *
4607: * @throws NullPointerException
4608: * if <tt>map</tt> is <tt>null</tt>.
4609: *
4610: * @see #asCharKeyFloats(Map)
4611: */
4612: public static boolean isCharKeyFloatAdaptable(Map map) {
4613: return isCharAdaptable(map.keySet())
4614: && isFloatAdaptable(map.values());
4615: }
4616:
4617: /**
4618: * Indicates whether a specified map is adaptable
4619: * to a primitive map with char keys and double values. For a
4620: * map to be adaptable it can only contain
4621: * keys of class {@link Character Character},
4622: * values of class {@link Double Double},
4623: * and no <tt>null</tt> keys or <tt>null</tt> values.
4624: *
4625: * @param map
4626: * the map to examine.
4627: *
4628: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4629: * {@link CharKeyDoubleMap CharKeyDoubleMap};
4630: * returns <tt>false</tt> otherwise.
4631: *
4632: * @throws NullPointerException
4633: * if <tt>map</tt> is <tt>null</tt>.
4634: *
4635: * @see #asCharKeyDoubles(Map)
4636: */
4637: public static boolean isCharKeyDoubleAdaptable(Map map) {
4638: return isCharAdaptable(map.keySet())
4639: && isDoubleAdaptable(map.values());
4640: }
4641:
4642: /**
4643: * Indicates whether a specified map is adaptable
4644: * to a primitive map with byte keys and boolean values. For a
4645: * map to be adaptable it can only contain
4646: * keys of class {@link Byte Byte},
4647: * values of class {@link Boolean Boolean},
4648: * and no <tt>null</tt> keys or <tt>null</tt> values.
4649: *
4650: * @param map
4651: * the map to examine.
4652: *
4653: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4654: * {@link ByteKeyBooleanMap ByteKeyBooleanMap};
4655: * returns <tt>false</tt> otherwise.
4656: *
4657: * @throws NullPointerException
4658: * if <tt>map</tt> is <tt>null</tt>.
4659: *
4660: * @see #asByteKeyBooleans(Map)
4661: */
4662: public static boolean isByteKeyBooleanAdaptable(Map map) {
4663: return isByteAdaptable(map.keySet())
4664: && isBooleanAdaptable(map.values());
4665: }
4666:
4667: /**
4668: * Indicates whether a specified map is adaptable
4669: * to a primitive map with byte keys and char values. For a
4670: * map to be adaptable it can only contain
4671: * keys of class {@link Byte Byte},
4672: * values of class {@link Character Character},
4673: * and no <tt>null</tt> keys or <tt>null</tt> values.
4674: *
4675: * @param map
4676: * the map to examine.
4677: *
4678: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4679: * {@link ByteKeyCharMap ByteKeyCharMap};
4680: * returns <tt>false</tt> otherwise.
4681: *
4682: * @throws NullPointerException
4683: * if <tt>map</tt> is <tt>null</tt>.
4684: *
4685: * @see #asByteKeyChars(Map)
4686: */
4687: public static boolean isByteKeyCharAdaptable(Map map) {
4688: return isByteAdaptable(map.keySet())
4689: && isCharAdaptable(map.values());
4690: }
4691:
4692: /**
4693: * Indicates whether a specified map is adaptable
4694: * to a primitive map with byte keys and byte values. For a
4695: * map to be adaptable it can only contain
4696: * keys of class {@link Byte Byte},
4697: * values of class {@link Byte Byte},
4698: * and no <tt>null</tt> keys or <tt>null</tt> values.
4699: *
4700: * @param map
4701: * the map to examine.
4702: *
4703: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4704: * {@link ByteKeyByteMap ByteKeyByteMap};
4705: * returns <tt>false</tt> otherwise.
4706: *
4707: * @throws NullPointerException
4708: * if <tt>map</tt> is <tt>null</tt>.
4709: *
4710: * @see #asByteKeyBytes(Map)
4711: */
4712: public static boolean isByteKeyByteAdaptable(Map map) {
4713: return isByteAdaptable(map.keySet())
4714: && isByteAdaptable(map.values());
4715: }
4716:
4717: /**
4718: * Indicates whether a specified map is adaptable
4719: * to a primitive map with byte keys and short values. For a
4720: * map to be adaptable it can only contain
4721: * keys of class {@link Byte Byte},
4722: * values of class {@link Short Short},
4723: * and no <tt>null</tt> keys or <tt>null</tt> values.
4724: *
4725: * @param map
4726: * the map to examine.
4727: *
4728: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4729: * {@link ByteKeyShortMap ByteKeyShortMap};
4730: * returns <tt>false</tt> otherwise.
4731: *
4732: * @throws NullPointerException
4733: * if <tt>map</tt> is <tt>null</tt>.
4734: *
4735: * @see #asByteKeyShorts(Map)
4736: */
4737: public static boolean isByteKeyShortAdaptable(Map map) {
4738: return isByteAdaptable(map.keySet())
4739: && isShortAdaptable(map.values());
4740: }
4741:
4742: /**
4743: * Indicates whether a specified map is adaptable
4744: * to a primitive map with byte keys and int values. For a
4745: * map to be adaptable it can only contain
4746: * keys of class {@link Byte Byte},
4747: * values of class {@link Integer Integer},
4748: * and no <tt>null</tt> keys or <tt>null</tt> values.
4749: *
4750: * @param map
4751: * the map to examine.
4752: *
4753: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4754: * {@link ByteKeyIntMap ByteKeyIntMap};
4755: * returns <tt>false</tt> otherwise.
4756: *
4757: * @throws NullPointerException
4758: * if <tt>map</tt> is <tt>null</tt>.
4759: *
4760: * @see #asByteKeyInts(Map)
4761: */
4762: public static boolean isByteKeyIntAdaptable(Map map) {
4763: return isByteAdaptable(map.keySet())
4764: && isIntAdaptable(map.values());
4765: }
4766:
4767: /**
4768: * Indicates whether a specified map is adaptable
4769: * to a primitive map with byte keys and long values. For a
4770: * map to be adaptable it can only contain
4771: * keys of class {@link Byte Byte},
4772: * values of class {@link Long Long},
4773: * and no <tt>null</tt> keys or <tt>null</tt> values.
4774: *
4775: * @param map
4776: * the map to examine.
4777: *
4778: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4779: * {@link ByteKeyLongMap ByteKeyLongMap};
4780: * returns <tt>false</tt> otherwise.
4781: *
4782: * @throws NullPointerException
4783: * if <tt>map</tt> is <tt>null</tt>.
4784: *
4785: * @see #asByteKeyLongs(Map)
4786: */
4787: public static boolean isByteKeyLongAdaptable(Map map) {
4788: return isByteAdaptable(map.keySet())
4789: && isLongAdaptable(map.values());
4790: }
4791:
4792: /**
4793: * Indicates whether a specified map is adaptable
4794: * to a primitive map with byte keys and float values. For a
4795: * map to be adaptable it can only contain
4796: * keys of class {@link Byte Byte},
4797: * values of class {@link Float Float},
4798: * and no <tt>null</tt> keys or <tt>null</tt> values.
4799: *
4800: * @param map
4801: * the map to examine.
4802: *
4803: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4804: * {@link ByteKeyFloatMap ByteKeyFloatMap};
4805: * returns <tt>false</tt> otherwise.
4806: *
4807: * @throws NullPointerException
4808: * if <tt>map</tt> is <tt>null</tt>.
4809: *
4810: * @see #asByteKeyFloats(Map)
4811: */
4812: public static boolean isByteKeyFloatAdaptable(Map map) {
4813: return isByteAdaptable(map.keySet())
4814: && isFloatAdaptable(map.values());
4815: }
4816:
4817: /**
4818: * Indicates whether a specified map is adaptable
4819: * to a primitive map with byte keys and double values. For a
4820: * map to be adaptable it can only contain
4821: * keys of class {@link Byte Byte},
4822: * values of class {@link Double Double},
4823: * and no <tt>null</tt> keys or <tt>null</tt> values.
4824: *
4825: * @param map
4826: * the map to examine.
4827: *
4828: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4829: * {@link ByteKeyDoubleMap ByteKeyDoubleMap};
4830: * returns <tt>false</tt> otherwise.
4831: *
4832: * @throws NullPointerException
4833: * if <tt>map</tt> is <tt>null</tt>.
4834: *
4835: * @see #asByteKeyDoubles(Map)
4836: */
4837: public static boolean isByteKeyDoubleAdaptable(Map map) {
4838: return isByteAdaptable(map.keySet())
4839: && isDoubleAdaptable(map.values());
4840: }
4841:
4842: /**
4843: * Indicates whether a specified map is adaptable
4844: * to a primitive map with short keys and boolean values. For a
4845: * map to be adaptable it can only contain
4846: * keys of class {@link Short Short},
4847: * values of class {@link Boolean Boolean},
4848: * and no <tt>null</tt> keys or <tt>null</tt> values.
4849: *
4850: * @param map
4851: * the map to examine.
4852: *
4853: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4854: * {@link ShortKeyBooleanMap ShortKeyBooleanMap};
4855: * returns <tt>false</tt> otherwise.
4856: *
4857: * @throws NullPointerException
4858: * if <tt>map</tt> is <tt>null</tt>.
4859: *
4860: * @see #asShortKeyBooleans(Map)
4861: */
4862: public static boolean isShortKeyBooleanAdaptable(Map map) {
4863: return isShortAdaptable(map.keySet())
4864: && isBooleanAdaptable(map.values());
4865: }
4866:
4867: /**
4868: * Indicates whether a specified map is adaptable
4869: * to a primitive map with short keys and char values. For a
4870: * map to be adaptable it can only contain
4871: * keys of class {@link Short Short},
4872: * values of class {@link Character Character},
4873: * and no <tt>null</tt> keys or <tt>null</tt> values.
4874: *
4875: * @param map
4876: * the map to examine.
4877: *
4878: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4879: * {@link ShortKeyCharMap ShortKeyCharMap};
4880: * returns <tt>false</tt> otherwise.
4881: *
4882: * @throws NullPointerException
4883: * if <tt>map</tt> is <tt>null</tt>.
4884: *
4885: * @see #asShortKeyChars(Map)
4886: */
4887: public static boolean isShortKeyCharAdaptable(Map map) {
4888: return isShortAdaptable(map.keySet())
4889: && isCharAdaptable(map.values());
4890: }
4891:
4892: /**
4893: * Indicates whether a specified map is adaptable
4894: * to a primitive map with short keys and byte values. For a
4895: * map to be adaptable it can only contain
4896: * keys of class {@link Short Short},
4897: * values of class {@link Byte Byte},
4898: * and no <tt>null</tt> keys or <tt>null</tt> values.
4899: *
4900: * @param map
4901: * the map to examine.
4902: *
4903: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4904: * {@link ShortKeyByteMap ShortKeyByteMap};
4905: * returns <tt>false</tt> otherwise.
4906: *
4907: * @throws NullPointerException
4908: * if <tt>map</tt> is <tt>null</tt>.
4909: *
4910: * @see #asShortKeyBytes(Map)
4911: */
4912: public static boolean isShortKeyByteAdaptable(Map map) {
4913: return isShortAdaptable(map.keySet())
4914: && isByteAdaptable(map.values());
4915: }
4916:
4917: /**
4918: * Indicates whether a specified map is adaptable
4919: * to a primitive map with short keys and short values. For a
4920: * map to be adaptable it can only contain
4921: * keys of class {@link Short Short},
4922: * values of class {@link Short Short},
4923: * and no <tt>null</tt> keys or <tt>null</tt> values.
4924: *
4925: * @param map
4926: * the map to examine.
4927: *
4928: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4929: * {@link ShortKeyShortMap ShortKeyShortMap};
4930: * returns <tt>false</tt> otherwise.
4931: *
4932: * @throws NullPointerException
4933: * if <tt>map</tt> is <tt>null</tt>.
4934: *
4935: * @see #asShortKeyShorts(Map)
4936: */
4937: public static boolean isShortKeyShortAdaptable(Map map) {
4938: return isShortAdaptable(map.keySet())
4939: && isShortAdaptable(map.values());
4940: }
4941:
4942: /**
4943: * Indicates whether a specified map is adaptable
4944: * to a primitive map with short keys and int values. For a
4945: * map to be adaptable it can only contain
4946: * keys of class {@link Short Short},
4947: * values of class {@link Integer Integer},
4948: * and no <tt>null</tt> keys or <tt>null</tt> values.
4949: *
4950: * @param map
4951: * the map to examine.
4952: *
4953: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4954: * {@link ShortKeyIntMap ShortKeyIntMap};
4955: * returns <tt>false</tt> otherwise.
4956: *
4957: * @throws NullPointerException
4958: * if <tt>map</tt> is <tt>null</tt>.
4959: *
4960: * @see #asShortKeyInts(Map)
4961: */
4962: public static boolean isShortKeyIntAdaptable(Map map) {
4963: return isShortAdaptable(map.keySet())
4964: && isIntAdaptable(map.values());
4965: }
4966:
4967: /**
4968: * Indicates whether a specified map is adaptable
4969: * to a primitive map with short keys and long values. For a
4970: * map to be adaptable it can only contain
4971: * keys of class {@link Short Short},
4972: * values of class {@link Long Long},
4973: * and no <tt>null</tt> keys or <tt>null</tt> values.
4974: *
4975: * @param map
4976: * the map to examine.
4977: *
4978: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
4979: * {@link ShortKeyLongMap ShortKeyLongMap};
4980: * returns <tt>false</tt> otherwise.
4981: *
4982: * @throws NullPointerException
4983: * if <tt>map</tt> is <tt>null</tt>.
4984: *
4985: * @see #asShortKeyLongs(Map)
4986: */
4987: public static boolean isShortKeyLongAdaptable(Map map) {
4988: return isShortAdaptable(map.keySet())
4989: && isLongAdaptable(map.values());
4990: }
4991:
4992: /**
4993: * Indicates whether a specified map is adaptable
4994: * to a primitive map with short keys and float values. For a
4995: * map to be adaptable it can only contain
4996: * keys of class {@link Short Short},
4997: * values of class {@link Float Float},
4998: * and no <tt>null</tt> keys or <tt>null</tt> values.
4999: *
5000: * @param map
5001: * the map to examine.
5002: *
5003: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5004: * {@link ShortKeyFloatMap ShortKeyFloatMap};
5005: * returns <tt>false</tt> otherwise.
5006: *
5007: * @throws NullPointerException
5008: * if <tt>map</tt> is <tt>null</tt>.
5009: *
5010: * @see #asShortKeyFloats(Map)
5011: */
5012: public static boolean isShortKeyFloatAdaptable(Map map) {
5013: return isShortAdaptable(map.keySet())
5014: && isFloatAdaptable(map.values());
5015: }
5016:
5017: /**
5018: * Indicates whether a specified map is adaptable
5019: * to a primitive map with short keys and double values. For a
5020: * map to be adaptable it can only contain
5021: * keys of class {@link Short Short},
5022: * values of class {@link Double Double},
5023: * and no <tt>null</tt> keys or <tt>null</tt> values.
5024: *
5025: * @param map
5026: * the map to examine.
5027: *
5028: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5029: * {@link ShortKeyDoubleMap ShortKeyDoubleMap};
5030: * returns <tt>false</tt> otherwise.
5031: *
5032: * @throws NullPointerException
5033: * if <tt>map</tt> is <tt>null</tt>.
5034: *
5035: * @see #asShortKeyDoubles(Map)
5036: */
5037: public static boolean isShortKeyDoubleAdaptable(Map map) {
5038: return isShortAdaptable(map.keySet())
5039: && isDoubleAdaptable(map.values());
5040: }
5041:
5042: /**
5043: * Indicates whether a specified map is adaptable
5044: * to a primitive map with int keys and boolean values. For a
5045: * map to be adaptable it can only contain
5046: * keys of class {@link Integer Integer},
5047: * values of class {@link Boolean Boolean},
5048: * and no <tt>null</tt> keys or <tt>null</tt> values.
5049: *
5050: * @param map
5051: * the map to examine.
5052: *
5053: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5054: * {@link IntKeyBooleanMap IntKeyBooleanMap};
5055: * returns <tt>false</tt> otherwise.
5056: *
5057: * @throws NullPointerException
5058: * if <tt>map</tt> is <tt>null</tt>.
5059: *
5060: * @see #asIntKeyBooleans(Map)
5061: */
5062: public static boolean isIntKeyBooleanAdaptable(Map map) {
5063: return isIntAdaptable(map.keySet())
5064: && isBooleanAdaptable(map.values());
5065: }
5066:
5067: /**
5068: * Indicates whether a specified map is adaptable
5069: * to a primitive map with int keys and char values. For a
5070: * map to be adaptable it can only contain
5071: * keys of class {@link Integer Integer},
5072: * values of class {@link Character Character},
5073: * and no <tt>null</tt> keys or <tt>null</tt> values.
5074: *
5075: * @param map
5076: * the map to examine.
5077: *
5078: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5079: * {@link IntKeyCharMap IntKeyCharMap};
5080: * returns <tt>false</tt> otherwise.
5081: *
5082: * @throws NullPointerException
5083: * if <tt>map</tt> is <tt>null</tt>.
5084: *
5085: * @see #asIntKeyChars(Map)
5086: */
5087: public static boolean isIntKeyCharAdaptable(Map map) {
5088: return isIntAdaptable(map.keySet())
5089: && isCharAdaptable(map.values());
5090: }
5091:
5092: /**
5093: * Indicates whether a specified map is adaptable
5094: * to a primitive map with int keys and byte values. For a
5095: * map to be adaptable it can only contain
5096: * keys of class {@link Integer Integer},
5097: * values of class {@link Byte Byte},
5098: * and no <tt>null</tt> keys or <tt>null</tt> values.
5099: *
5100: * @param map
5101: * the map to examine.
5102: *
5103: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5104: * {@link IntKeyByteMap IntKeyByteMap};
5105: * returns <tt>false</tt> otherwise.
5106: *
5107: * @throws NullPointerException
5108: * if <tt>map</tt> is <tt>null</tt>.
5109: *
5110: * @see #asIntKeyBytes(Map)
5111: */
5112: public static boolean isIntKeyByteAdaptable(Map map) {
5113: return isIntAdaptable(map.keySet())
5114: && isByteAdaptable(map.values());
5115: }
5116:
5117: /**
5118: * Indicates whether a specified map is adaptable
5119: * to a primitive map with int keys and short values. For a
5120: * map to be adaptable it can only contain
5121: * keys of class {@link Integer Integer},
5122: * values of class {@link Short Short},
5123: * and no <tt>null</tt> keys or <tt>null</tt> values.
5124: *
5125: * @param map
5126: * the map to examine.
5127: *
5128: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5129: * {@link IntKeyShortMap IntKeyShortMap};
5130: * returns <tt>false</tt> otherwise.
5131: *
5132: * @throws NullPointerException
5133: * if <tt>map</tt> is <tt>null</tt>.
5134: *
5135: * @see #asIntKeyShorts(Map)
5136: */
5137: public static boolean isIntKeyShortAdaptable(Map map) {
5138: return isIntAdaptable(map.keySet())
5139: && isShortAdaptable(map.values());
5140: }
5141:
5142: /**
5143: * Indicates whether a specified map is adaptable
5144: * to a primitive map with int keys and int values. For a
5145: * map to be adaptable it can only contain
5146: * keys of class {@link Integer Integer},
5147: * values of class {@link Integer Integer},
5148: * and no <tt>null</tt> keys or <tt>null</tt> values.
5149: *
5150: * @param map
5151: * the map to examine.
5152: *
5153: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5154: * {@link IntKeyIntMap IntKeyIntMap};
5155: * returns <tt>false</tt> otherwise.
5156: *
5157: * @throws NullPointerException
5158: * if <tt>map</tt> is <tt>null</tt>.
5159: *
5160: * @see #asIntKeyInts(Map)
5161: */
5162: public static boolean isIntKeyIntAdaptable(Map map) {
5163: return isIntAdaptable(map.keySet())
5164: && isIntAdaptable(map.values());
5165: }
5166:
5167: /**
5168: * Indicates whether a specified map is adaptable
5169: * to a primitive map with int keys and long values. For a
5170: * map to be adaptable it can only contain
5171: * keys of class {@link Integer Integer},
5172: * values of class {@link Long Long},
5173: * and no <tt>null</tt> keys or <tt>null</tt> values.
5174: *
5175: * @param map
5176: * the map to examine.
5177: *
5178: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5179: * {@link IntKeyLongMap IntKeyLongMap};
5180: * returns <tt>false</tt> otherwise.
5181: *
5182: * @throws NullPointerException
5183: * if <tt>map</tt> is <tt>null</tt>.
5184: *
5185: * @see #asIntKeyLongs(Map)
5186: */
5187: public static boolean isIntKeyLongAdaptable(Map map) {
5188: return isIntAdaptable(map.keySet())
5189: && isLongAdaptable(map.values());
5190: }
5191:
5192: /**
5193: * Indicates whether a specified map is adaptable
5194: * to a primitive map with int keys and float values. For a
5195: * map to be adaptable it can only contain
5196: * keys of class {@link Integer Integer},
5197: * values of class {@link Float Float},
5198: * and no <tt>null</tt> keys or <tt>null</tt> values.
5199: *
5200: * @param map
5201: * the map to examine.
5202: *
5203: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5204: * {@link IntKeyFloatMap IntKeyFloatMap};
5205: * returns <tt>false</tt> otherwise.
5206: *
5207: * @throws NullPointerException
5208: * if <tt>map</tt> is <tt>null</tt>.
5209: *
5210: * @see #asIntKeyFloats(Map)
5211: */
5212: public static boolean isIntKeyFloatAdaptable(Map map) {
5213: return isIntAdaptable(map.keySet())
5214: && isFloatAdaptable(map.values());
5215: }
5216:
5217: /**
5218: * Indicates whether a specified map is adaptable
5219: * to a primitive map with int keys and double values. For a
5220: * map to be adaptable it can only contain
5221: * keys of class {@link Integer Integer},
5222: * values of class {@link Double Double},
5223: * and no <tt>null</tt> keys or <tt>null</tt> values.
5224: *
5225: * @param map
5226: * the map to examine.
5227: *
5228: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5229: * {@link IntKeyDoubleMap IntKeyDoubleMap};
5230: * returns <tt>false</tt> otherwise.
5231: *
5232: * @throws NullPointerException
5233: * if <tt>map</tt> is <tt>null</tt>.
5234: *
5235: * @see #asIntKeyDoubles(Map)
5236: */
5237: public static boolean isIntKeyDoubleAdaptable(Map map) {
5238: return isIntAdaptable(map.keySet())
5239: && isDoubleAdaptable(map.values());
5240: }
5241:
5242: /**
5243: * Indicates whether a specified map is adaptable
5244: * to a primitive map with long keys and boolean values. For a
5245: * map to be adaptable it can only contain
5246: * keys of class {@link Long Long},
5247: * values of class {@link Boolean Boolean},
5248: * and no <tt>null</tt> keys or <tt>null</tt> values.
5249: *
5250: * @param map
5251: * the map to examine.
5252: *
5253: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5254: * {@link LongKeyBooleanMap LongKeyBooleanMap};
5255: * returns <tt>false</tt> otherwise.
5256: *
5257: * @throws NullPointerException
5258: * if <tt>map</tt> is <tt>null</tt>.
5259: *
5260: * @see #asLongKeyBooleans(Map)
5261: */
5262: public static boolean isLongKeyBooleanAdaptable(Map map) {
5263: return isLongAdaptable(map.keySet())
5264: && isBooleanAdaptable(map.values());
5265: }
5266:
5267: /**
5268: * Indicates whether a specified map is adaptable
5269: * to a primitive map with long keys and char values. For a
5270: * map to be adaptable it can only contain
5271: * keys of class {@link Long Long},
5272: * values of class {@link Character Character},
5273: * and no <tt>null</tt> keys or <tt>null</tt> values.
5274: *
5275: * @param map
5276: * the map to examine.
5277: *
5278: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5279: * {@link LongKeyCharMap LongKeyCharMap};
5280: * returns <tt>false</tt> otherwise.
5281: *
5282: * @throws NullPointerException
5283: * if <tt>map</tt> is <tt>null</tt>.
5284: *
5285: * @see #asLongKeyChars(Map)
5286: */
5287: public static boolean isLongKeyCharAdaptable(Map map) {
5288: return isLongAdaptable(map.keySet())
5289: && isCharAdaptable(map.values());
5290: }
5291:
5292: /**
5293: * Indicates whether a specified map is adaptable
5294: * to a primitive map with long keys and byte values. For a
5295: * map to be adaptable it can only contain
5296: * keys of class {@link Long Long},
5297: * values of class {@link Byte Byte},
5298: * and no <tt>null</tt> keys or <tt>null</tt> values.
5299: *
5300: * @param map
5301: * the map to examine.
5302: *
5303: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5304: * {@link LongKeyByteMap LongKeyByteMap};
5305: * returns <tt>false</tt> otherwise.
5306: *
5307: * @throws NullPointerException
5308: * if <tt>map</tt> is <tt>null</tt>.
5309: *
5310: * @see #asLongKeyBytes(Map)
5311: */
5312: public static boolean isLongKeyByteAdaptable(Map map) {
5313: return isLongAdaptable(map.keySet())
5314: && isByteAdaptable(map.values());
5315: }
5316:
5317: /**
5318: * Indicates whether a specified map is adaptable
5319: * to a primitive map with long keys and short values. For a
5320: * map to be adaptable it can only contain
5321: * keys of class {@link Long Long},
5322: * values of class {@link Short Short},
5323: * and no <tt>null</tt> keys or <tt>null</tt> values.
5324: *
5325: * @param map
5326: * the map to examine.
5327: *
5328: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5329: * {@link LongKeyShortMap LongKeyShortMap};
5330: * returns <tt>false</tt> otherwise.
5331: *
5332: * @throws NullPointerException
5333: * if <tt>map</tt> is <tt>null</tt>.
5334: *
5335: * @see #asLongKeyShorts(Map)
5336: */
5337: public static boolean isLongKeyShortAdaptable(Map map) {
5338: return isLongAdaptable(map.keySet())
5339: && isShortAdaptable(map.values());
5340: }
5341:
5342: /**
5343: * Indicates whether a specified map is adaptable
5344: * to a primitive map with long keys and int values. For a
5345: * map to be adaptable it can only contain
5346: * keys of class {@link Long Long},
5347: * values of class {@link Integer Integer},
5348: * and no <tt>null</tt> keys or <tt>null</tt> values.
5349: *
5350: * @param map
5351: * the map to examine.
5352: *
5353: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5354: * {@link LongKeyIntMap LongKeyIntMap};
5355: * returns <tt>false</tt> otherwise.
5356: *
5357: * @throws NullPointerException
5358: * if <tt>map</tt> is <tt>null</tt>.
5359: *
5360: * @see #asLongKeyInts(Map)
5361: */
5362: public static boolean isLongKeyIntAdaptable(Map map) {
5363: return isLongAdaptable(map.keySet())
5364: && isIntAdaptable(map.values());
5365: }
5366:
5367: /**
5368: * Indicates whether a specified map is adaptable
5369: * to a primitive map with long keys and long values. For a
5370: * map to be adaptable it can only contain
5371: * keys of class {@link Long Long},
5372: * values of class {@link Long Long},
5373: * and no <tt>null</tt> keys or <tt>null</tt> values.
5374: *
5375: * @param map
5376: * the map to examine.
5377: *
5378: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5379: * {@link LongKeyLongMap LongKeyLongMap};
5380: * returns <tt>false</tt> otherwise.
5381: *
5382: * @throws NullPointerException
5383: * if <tt>map</tt> is <tt>null</tt>.
5384: *
5385: * @see #asLongKeyLongs(Map)
5386: */
5387: public static boolean isLongKeyLongAdaptable(Map map) {
5388: return isLongAdaptable(map.keySet())
5389: && isLongAdaptable(map.values());
5390: }
5391:
5392: /**
5393: * Indicates whether a specified map is adaptable
5394: * to a primitive map with long keys and float values. For a
5395: * map to be adaptable it can only contain
5396: * keys of class {@link Long Long},
5397: * values of class {@link Float Float},
5398: * and no <tt>null</tt> keys or <tt>null</tt> values.
5399: *
5400: * @param map
5401: * the map to examine.
5402: *
5403: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5404: * {@link LongKeyFloatMap LongKeyFloatMap};
5405: * returns <tt>false</tt> otherwise.
5406: *
5407: * @throws NullPointerException
5408: * if <tt>map</tt> is <tt>null</tt>.
5409: *
5410: * @see #asLongKeyFloats(Map)
5411: */
5412: public static boolean isLongKeyFloatAdaptable(Map map) {
5413: return isLongAdaptable(map.keySet())
5414: && isFloatAdaptable(map.values());
5415: }
5416:
5417: /**
5418: * Indicates whether a specified map is adaptable
5419: * to a primitive map with long keys and double values. For a
5420: * map to be adaptable it can only contain
5421: * keys of class {@link Long Long},
5422: * values of class {@link Double Double},
5423: * and no <tt>null</tt> keys or <tt>null</tt> values.
5424: *
5425: * @param map
5426: * the map to examine.
5427: *
5428: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5429: * {@link LongKeyDoubleMap LongKeyDoubleMap};
5430: * returns <tt>false</tt> otherwise.
5431: *
5432: * @throws NullPointerException
5433: * if <tt>map</tt> is <tt>null</tt>.
5434: *
5435: * @see #asLongKeyDoubles(Map)
5436: */
5437: public static boolean isLongKeyDoubleAdaptable(Map map) {
5438: return isLongAdaptable(map.keySet())
5439: && isDoubleAdaptable(map.values());
5440: }
5441:
5442: /**
5443: * Indicates whether a specified map is adaptable
5444: * to a primitive map with float keys and boolean values. For a
5445: * map to be adaptable it can only contain
5446: * keys of class {@link Float Float},
5447: * values of class {@link Boolean Boolean},
5448: * and no <tt>null</tt> keys or <tt>null</tt> values.
5449: *
5450: * @param map
5451: * the map to examine.
5452: *
5453: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5454: * {@link FloatKeyBooleanMap FloatKeyBooleanMap};
5455: * returns <tt>false</tt> otherwise.
5456: *
5457: * @throws NullPointerException
5458: * if <tt>map</tt> is <tt>null</tt>.
5459: *
5460: * @see #asFloatKeyBooleans(Map)
5461: */
5462: public static boolean isFloatKeyBooleanAdaptable(Map map) {
5463: return isFloatAdaptable(map.keySet())
5464: && isBooleanAdaptable(map.values());
5465: }
5466:
5467: /**
5468: * Indicates whether a specified map is adaptable
5469: * to a primitive map with float keys and char values. For a
5470: * map to be adaptable it can only contain
5471: * keys of class {@link Float Float},
5472: * values of class {@link Character Character},
5473: * and no <tt>null</tt> keys or <tt>null</tt> values.
5474: *
5475: * @param map
5476: * the map to examine.
5477: *
5478: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5479: * {@link FloatKeyCharMap FloatKeyCharMap};
5480: * returns <tt>false</tt> otherwise.
5481: *
5482: * @throws NullPointerException
5483: * if <tt>map</tt> is <tt>null</tt>.
5484: *
5485: * @see #asFloatKeyChars(Map)
5486: */
5487: public static boolean isFloatKeyCharAdaptable(Map map) {
5488: return isFloatAdaptable(map.keySet())
5489: && isCharAdaptable(map.values());
5490: }
5491:
5492: /**
5493: * Indicates whether a specified map is adaptable
5494: * to a primitive map with float keys and byte values. For a
5495: * map to be adaptable it can only contain
5496: * keys of class {@link Float Float},
5497: * values of class {@link Byte Byte},
5498: * and no <tt>null</tt> keys or <tt>null</tt> values.
5499: *
5500: * @param map
5501: * the map to examine.
5502: *
5503: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5504: * {@link FloatKeyByteMap FloatKeyByteMap};
5505: * returns <tt>false</tt> otherwise.
5506: *
5507: * @throws NullPointerException
5508: * if <tt>map</tt> is <tt>null</tt>.
5509: *
5510: * @see #asFloatKeyBytes(Map)
5511: */
5512: public static boolean isFloatKeyByteAdaptable(Map map) {
5513: return isFloatAdaptable(map.keySet())
5514: && isByteAdaptable(map.values());
5515: }
5516:
5517: /**
5518: * Indicates whether a specified map is adaptable
5519: * to a primitive map with float keys and short values. For a
5520: * map to be adaptable it can only contain
5521: * keys of class {@link Float Float},
5522: * values of class {@link Short Short},
5523: * and no <tt>null</tt> keys or <tt>null</tt> values.
5524: *
5525: * @param map
5526: * the map to examine.
5527: *
5528: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5529: * {@link FloatKeyShortMap FloatKeyShortMap};
5530: * returns <tt>false</tt> otherwise.
5531: *
5532: * @throws NullPointerException
5533: * if <tt>map</tt> is <tt>null</tt>.
5534: *
5535: * @see #asFloatKeyShorts(Map)
5536: */
5537: public static boolean isFloatKeyShortAdaptable(Map map) {
5538: return isFloatAdaptable(map.keySet())
5539: && isShortAdaptable(map.values());
5540: }
5541:
5542: /**
5543: * Indicates whether a specified map is adaptable
5544: * to a primitive map with float keys and int values. For a
5545: * map to be adaptable it can only contain
5546: * keys of class {@link Float Float},
5547: * values of class {@link Integer Integer},
5548: * and no <tt>null</tt> keys or <tt>null</tt> values.
5549: *
5550: * @param map
5551: * the map to examine.
5552: *
5553: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5554: * {@link FloatKeyIntMap FloatKeyIntMap};
5555: * returns <tt>false</tt> otherwise.
5556: *
5557: * @throws NullPointerException
5558: * if <tt>map</tt> is <tt>null</tt>.
5559: *
5560: * @see #asFloatKeyInts(Map)
5561: */
5562: public static boolean isFloatKeyIntAdaptable(Map map) {
5563: return isFloatAdaptable(map.keySet())
5564: && isIntAdaptable(map.values());
5565: }
5566:
5567: /**
5568: * Indicates whether a specified map is adaptable
5569: * to a primitive map with float keys and long values. For a
5570: * map to be adaptable it can only contain
5571: * keys of class {@link Float Float},
5572: * values of class {@link Long Long},
5573: * and no <tt>null</tt> keys or <tt>null</tt> values.
5574: *
5575: * @param map
5576: * the map to examine.
5577: *
5578: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5579: * {@link FloatKeyLongMap FloatKeyLongMap};
5580: * returns <tt>false</tt> otherwise.
5581: *
5582: * @throws NullPointerException
5583: * if <tt>map</tt> is <tt>null</tt>.
5584: *
5585: * @see #asFloatKeyLongs(Map)
5586: */
5587: public static boolean isFloatKeyLongAdaptable(Map map) {
5588: return isFloatAdaptable(map.keySet())
5589: && isLongAdaptable(map.values());
5590: }
5591:
5592: /**
5593: * Indicates whether a specified map is adaptable
5594: * to a primitive map with float keys and float values. For a
5595: * map to be adaptable it can only contain
5596: * keys of class {@link Float Float},
5597: * values of class {@link Float Float},
5598: * and no <tt>null</tt> keys or <tt>null</tt> values.
5599: *
5600: * @param map
5601: * the map to examine.
5602: *
5603: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5604: * {@link FloatKeyFloatMap FloatKeyFloatMap};
5605: * returns <tt>false</tt> otherwise.
5606: *
5607: * @throws NullPointerException
5608: * if <tt>map</tt> is <tt>null</tt>.
5609: *
5610: * @see #asFloatKeyFloats(Map)
5611: */
5612: public static boolean isFloatKeyFloatAdaptable(Map map) {
5613: return isFloatAdaptable(map.keySet())
5614: && isFloatAdaptable(map.values());
5615: }
5616:
5617: /**
5618: * Indicates whether a specified map is adaptable
5619: * to a primitive map with float keys and double values. For a
5620: * map to be adaptable it can only contain
5621: * keys of class {@link Float Float},
5622: * values of class {@link Double Double},
5623: * and no <tt>null</tt> keys or <tt>null</tt> values.
5624: *
5625: * @param map
5626: * the map to examine.
5627: *
5628: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5629: * {@link FloatKeyDoubleMap FloatKeyDoubleMap};
5630: * returns <tt>false</tt> otherwise.
5631: *
5632: * @throws NullPointerException
5633: * if <tt>map</tt> is <tt>null</tt>.
5634: *
5635: * @see #asFloatKeyDoubles(Map)
5636: */
5637: public static boolean isFloatKeyDoubleAdaptable(Map map) {
5638: return isFloatAdaptable(map.keySet())
5639: && isDoubleAdaptable(map.values());
5640: }
5641:
5642: /**
5643: * Indicates whether a specified map is adaptable
5644: * to a primitive map with double keys and boolean values. For a
5645: * map to be adaptable it can only contain
5646: * keys of class {@link Double Double},
5647: * values of class {@link Boolean Boolean},
5648: * and no <tt>null</tt> keys or <tt>null</tt> values.
5649: *
5650: * @param map
5651: * the map to examine.
5652: *
5653: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5654: * {@link DoubleKeyBooleanMap DoubleKeyBooleanMap};
5655: * returns <tt>false</tt> otherwise.
5656: *
5657: * @throws NullPointerException
5658: * if <tt>map</tt> is <tt>null</tt>.
5659: *
5660: * @see #asDoubleKeyBooleans(Map)
5661: */
5662: public static boolean isDoubleKeyBooleanAdaptable(Map map) {
5663: return isDoubleAdaptable(map.keySet())
5664: && isBooleanAdaptable(map.values());
5665: }
5666:
5667: /**
5668: * Indicates whether a specified map is adaptable
5669: * to a primitive map with double keys and char values. For a
5670: * map to be adaptable it can only contain
5671: * keys of class {@link Double Double},
5672: * values of class {@link Character Character},
5673: * and no <tt>null</tt> keys or <tt>null</tt> values.
5674: *
5675: * @param map
5676: * the map to examine.
5677: *
5678: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5679: * {@link DoubleKeyCharMap DoubleKeyCharMap};
5680: * returns <tt>false</tt> otherwise.
5681: *
5682: * @throws NullPointerException
5683: * if <tt>map</tt> is <tt>null</tt>.
5684: *
5685: * @see #asDoubleKeyChars(Map)
5686: */
5687: public static boolean isDoubleKeyCharAdaptable(Map map) {
5688: return isDoubleAdaptable(map.keySet())
5689: && isCharAdaptable(map.values());
5690: }
5691:
5692: /**
5693: * Indicates whether a specified map is adaptable
5694: * to a primitive map with double keys and byte values. For a
5695: * map to be adaptable it can only contain
5696: * keys of class {@link Double Double},
5697: * values of class {@link Byte Byte},
5698: * and no <tt>null</tt> keys or <tt>null</tt> values.
5699: *
5700: * @param map
5701: * the map to examine.
5702: *
5703: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5704: * {@link DoubleKeyByteMap DoubleKeyByteMap};
5705: * returns <tt>false</tt> otherwise.
5706: *
5707: * @throws NullPointerException
5708: * if <tt>map</tt> is <tt>null</tt>.
5709: *
5710: * @see #asDoubleKeyBytes(Map)
5711: */
5712: public static boolean isDoubleKeyByteAdaptable(Map map) {
5713: return isDoubleAdaptable(map.keySet())
5714: && isByteAdaptable(map.values());
5715: }
5716:
5717: /**
5718: * Indicates whether a specified map is adaptable
5719: * to a primitive map with double keys and short values. For a
5720: * map to be adaptable it can only contain
5721: * keys of class {@link Double Double},
5722: * values of class {@link Short Short},
5723: * and no <tt>null</tt> keys or <tt>null</tt> values.
5724: *
5725: * @param map
5726: * the map to examine.
5727: *
5728: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5729: * {@link DoubleKeyShortMap DoubleKeyShortMap};
5730: * returns <tt>false</tt> otherwise.
5731: *
5732: * @throws NullPointerException
5733: * if <tt>map</tt> is <tt>null</tt>.
5734: *
5735: * @see #asDoubleKeyShorts(Map)
5736: */
5737: public static boolean isDoubleKeyShortAdaptable(Map map) {
5738: return isDoubleAdaptable(map.keySet())
5739: && isShortAdaptable(map.values());
5740: }
5741:
5742: /**
5743: * Indicates whether a specified map is adaptable
5744: * to a primitive map with double keys and int values. For a
5745: * map to be adaptable it can only contain
5746: * keys of class {@link Double Double},
5747: * values of class {@link Integer Integer},
5748: * and no <tt>null</tt> keys or <tt>null</tt> values.
5749: *
5750: * @param map
5751: * the map to examine.
5752: *
5753: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5754: * {@link DoubleKeyIntMap DoubleKeyIntMap};
5755: * returns <tt>false</tt> otherwise.
5756: *
5757: * @throws NullPointerException
5758: * if <tt>map</tt> is <tt>null</tt>.
5759: *
5760: * @see #asDoubleKeyInts(Map)
5761: */
5762: public static boolean isDoubleKeyIntAdaptable(Map map) {
5763: return isDoubleAdaptable(map.keySet())
5764: && isIntAdaptable(map.values());
5765: }
5766:
5767: /**
5768: * Indicates whether a specified map is adaptable
5769: * to a primitive map with double keys and long values. For a
5770: * map to be adaptable it can only contain
5771: * keys of class {@link Double Double},
5772: * values of class {@link Long Long},
5773: * and no <tt>null</tt> keys or <tt>null</tt> values.
5774: *
5775: * @param map
5776: * the map to examine.
5777: *
5778: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5779: * {@link DoubleKeyLongMap DoubleKeyLongMap};
5780: * returns <tt>false</tt> otherwise.
5781: *
5782: * @throws NullPointerException
5783: * if <tt>map</tt> is <tt>null</tt>.
5784: *
5785: * @see #asDoubleKeyLongs(Map)
5786: */
5787: public static boolean isDoubleKeyLongAdaptable(Map map) {
5788: return isDoubleAdaptable(map.keySet())
5789: && isLongAdaptable(map.values());
5790: }
5791:
5792: /**
5793: * Indicates whether a specified map is adaptable
5794: * to a primitive map with double keys and float values. For a
5795: * map to be adaptable it can only contain
5796: * keys of class {@link Double Double},
5797: * values of class {@link Float Float},
5798: * and no <tt>null</tt> keys or <tt>null</tt> values.
5799: *
5800: * @param map
5801: * the map to examine.
5802: *
5803: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5804: * {@link DoubleKeyFloatMap DoubleKeyFloatMap};
5805: * returns <tt>false</tt> otherwise.
5806: *
5807: * @throws NullPointerException
5808: * if <tt>map</tt> is <tt>null</tt>.
5809: *
5810: * @see #asDoubleKeyFloats(Map)
5811: */
5812: public static boolean isDoubleKeyFloatAdaptable(Map map) {
5813: return isDoubleAdaptable(map.keySet())
5814: && isFloatAdaptable(map.values());
5815: }
5816:
5817: /**
5818: * Indicates whether a specified map is adaptable
5819: * to a primitive map with double keys and double values. For a
5820: * map to be adaptable it can only contain
5821: * keys of class {@link Double Double},
5822: * values of class {@link Double Double},
5823: * and no <tt>null</tt> keys or <tt>null</tt> values.
5824: *
5825: * @param map
5826: * the map to examine.
5827: *
5828: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5829: * {@link DoubleKeyDoubleMap DoubleKeyDoubleMap};
5830: * returns <tt>false</tt> otherwise.
5831: *
5832: * @throws NullPointerException
5833: * if <tt>map</tt> is <tt>null</tt>.
5834: *
5835: * @see #asDoubleKeyDoubles(Map)
5836: */
5837: public static boolean isDoubleKeyDoubleAdaptable(Map map) {
5838: return isDoubleAdaptable(map.keySet())
5839: && isDoubleAdaptable(map.values());
5840: }
5841:
5842: // ---------------------------------------------------------------
5843: // isObjectKeyTAdaptable(Map map)
5844: // ---------------------------------------------------------------
5845:
5846: /**
5847: * Indicates whether a specified map is adaptable
5848: * to a primitive map with object keys and boolean values. For a
5849: * map to be adaptable it can only contain values of class
5850: * {@link Boolean Boolean} and no <tt>null</tt> values.
5851: *
5852: * @param map
5853: * the map to examine.
5854: *
5855: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5856: * {@link ObjectKeyBooleanMap ObjectKeyBooleanMap};
5857: * returns false otherwise.
5858: *
5859: * @throws NullPointerException
5860: * if <tt>map</tt> is <tt>null</tt>.
5861: *
5862: * @since 1.1
5863: */
5864: public static boolean isObjectKeyBooleanAdaptable(Map map) {
5865: return isBooleanAdaptable(map.values());
5866: }
5867:
5868: /**
5869: * Indicates whether a specified map is adaptable
5870: * to a primitive map with object keys and char values. For a
5871: * map to be adaptable it can only contain values of class
5872: * {@link Character Character} and no <tt>null</tt> values.
5873: *
5874: * @param map
5875: * the map to examine.
5876: *
5877: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5878: * {@link ObjectKeyCharMap ObjectKeyCharMap};
5879: * returns false otherwise.
5880: *
5881: * @throws NullPointerException
5882: * if <tt>map</tt> is <tt>null</tt>.
5883: *
5884: * @since 1.1
5885: */
5886: public static boolean isObjectKeyCharAdaptable(Map map) {
5887: return isCharAdaptable(map.values());
5888: }
5889:
5890: /**
5891: * Indicates whether a specified map is adaptable
5892: * to a primitive map with object keys and byte values. For a
5893: * map to be adaptable it can only contain values of class
5894: * {@link Byte Byte} and no <tt>null</tt> values.
5895: *
5896: * @param map
5897: * the map to examine.
5898: *
5899: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5900: * {@link ObjectKeyByteMap ObjectKeyByteMap};
5901: * returns false otherwise.
5902: *
5903: * @throws NullPointerException
5904: * if <tt>map</tt> is <tt>null</tt>.
5905: *
5906: * @since 1.1
5907: */
5908: public static boolean isObjectKeyByteAdaptable(Map map) {
5909: return isByteAdaptable(map.values());
5910: }
5911:
5912: /**
5913: * Indicates whether a specified map is adaptable
5914: * to a primitive map with object keys and short values. For a
5915: * map to be adaptable it can only contain values of class
5916: * {@link Short Short} and no <tt>null</tt> values.
5917: *
5918: * @param map
5919: * the map to examine.
5920: *
5921: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5922: * {@link ObjectKeyShortMap ObjectKeyShortMap};
5923: * returns false otherwise.
5924: *
5925: * @throws NullPointerException
5926: * if <tt>map</tt> is <tt>null</tt>.
5927: *
5928: * @since 1.1
5929: */
5930: public static boolean isObjectKeyShortAdaptable(Map map) {
5931: return isShortAdaptable(map.values());
5932: }
5933:
5934: /**
5935: * Indicates whether a specified map is adaptable
5936: * to a primitive map with object keys and int values. For a
5937: * map to be adaptable it can only contain values of class
5938: * {@link Integer Integer} and no <tt>null</tt> values.
5939: *
5940: * @param map
5941: * the map to examine.
5942: *
5943: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5944: * {@link ObjectKeyIntMap ObjectKeyIntMap};
5945: * returns false otherwise.
5946: *
5947: * @throws NullPointerException
5948: * if <tt>map</tt> is <tt>null</tt>.
5949: *
5950: * @since 1.1
5951: */
5952: public static boolean isObjectKeyIntAdaptable(Map map) {
5953: return isIntAdaptable(map.values());
5954: }
5955:
5956: /**
5957: * Indicates whether a specified map is adaptable
5958: * to a primitive map with object keys and long values. For a
5959: * map to be adaptable it can only contain values of class
5960: * {@link Long Long} and no <tt>null</tt> values.
5961: *
5962: * @param map
5963: * the map to examine.
5964: *
5965: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5966: * {@link ObjectKeyLongMap ObjectKeyLongMap};
5967: * returns false otherwise.
5968: *
5969: * @throws NullPointerException
5970: * if <tt>map</tt> is <tt>null</tt>.
5971: *
5972: * @since 1.1
5973: */
5974: public static boolean isObjectKeyLongAdaptable(Map map) {
5975: return isLongAdaptable(map.values());
5976: }
5977:
5978: /**
5979: * Indicates whether a specified map is adaptable
5980: * to a primitive map with object keys and float values. For a
5981: * map to be adaptable it can only contain values of class
5982: * {@link Float Float} and no <tt>null</tt> values.
5983: *
5984: * @param map
5985: * the map to examine.
5986: *
5987: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
5988: * {@link ObjectKeyFloatMap ObjectKeyFloatMap};
5989: * returns false otherwise.
5990: *
5991: * @throws NullPointerException
5992: * if <tt>map</tt> is <tt>null</tt>.
5993: *
5994: * @since 1.1
5995: */
5996: public static boolean isObjectKeyFloatAdaptable(Map map) {
5997: return isFloatAdaptable(map.values());
5998: }
5999:
6000: /**
6001: * Indicates whether a specified map is adaptable
6002: * to a primitive map with object keys and double values. For a
6003: * map to be adaptable it can only contain values of class
6004: * {@link Double Double} and no <tt>null</tt> values.
6005: *
6006: * @param map
6007: * the map to examine.
6008: *
6009: * @return <tt>true</tt> if <tt>map</tt> is adaptable to a
6010: * {@link ObjectKeyDoubleMap ObjectKeyDoubleMap};
6011: * returns false otherwise.
6012: *
6013: * @throws NullPointerException
6014: * if <tt>map</tt> is <tt>null</tt>.
6015: *
6016: * @since 1.1
6017: */
6018: public static boolean isObjectKeyDoubleAdaptable(Map map) {
6019: return isDoubleAdaptable(map.values());
6020: }
6021:
6022: }
|