/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Get the size of the header of this list. * * @return {@code >= 0;} the header size */ private int headerSize() { /* * Because of how this instance was set up, this is the same * as the alignment. */ return getAlignment(); } }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Constructs an instance. It is illegal to modify the given list once * it is used to construct an instance of this class. * * @param itemType {@code non-null;} the type of the item * @param items {@code non-null and non-empty;} list of items to represent */ public UniformListItem(ItemType itemType, List<T> items) { super(getAlignment(items), writeSize(items)); if (itemType == null) { throw new NullPointerException("itemType == null"); } this.items = items; this.itemType = itemType; }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Constructs an instance. It is illegal to modify the given list once * it is used to construct an instance of this class. * * @param itemType {@code non-null;} the type of the item * @param items {@code non-null and non-empty;} list of items to represent */ public UniformListItem(ItemType itemType, List<T> items) { super(getAlignment(items), writeSize(items)); if (itemType == null) { throw new NullPointerException("itemType == null"); } this.items = items; this.itemType = itemType; }
/** * Constructs an instance. It is illegal to modify the given list once * it is used to construct an instance of this class. * * @param itemType {@code non-null;} the type of the item * @param items {@code non-null and non-empty;} list of items to represent */ public UniformListItem(ItemType itemType, List<T> items) { super(getAlignment(items), writeSize(items)); if (itemType == null) { throw new NullPointerException("itemType == null"); } this.items = items; this.itemType = itemType; }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Calculates the write size for the given list. * * @param items {@code non-null;} the list in question * @return {@code >= 0;} the write size */ private static int writeSize(List<? extends OffsettedItem> items) { /* * This class assumes all included items are the same size, * an assumption which is verified in place0(). */ OffsettedItem first = items.get(0); return (items.size() * first.writeSize()) + getAlignment(items); }
/** * Constructs an instance. It is illegal to modify the given list once * it is used to construct an instance of this class. * * @param itemType {@code non-null;} the type of the item * @param items {@code non-null and non-empty;} list of items to represent */ public UniformListItem(ItemType itemType, List<T> items) { super(getAlignment(items), writeSize(items)); if (itemType == null) { throw new NullPointerException("itemType == null"); } this.items = items; this.itemType = itemType; }