|
@@ -116,10 +116,21 @@ public interface Block extends Accountable, BlockLoader.Block, NamedWriteable, R
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Can this block have multivalued fields? Blocks that return {@code false}
|
|
* Can this block have multivalued fields? Blocks that return {@code false}
|
|
|
- * will never return more than one from {@link #getValueCount}.
|
|
|
|
|
|
|
+ * will never return more than one from {@link #getValueCount}. This may
|
|
|
|
|
+ * return {@code true} for Blocks that do not have multivalued fields, but
|
|
|
|
|
+ * it will always answer quickly.
|
|
|
*/
|
|
*/
|
|
|
boolean mayHaveMultivaluedFields();
|
|
boolean mayHaveMultivaluedFields();
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Does this block have multivalued fields? Unlike {@link #mayHaveMultivaluedFields}
|
|
|
|
|
+ * this will never return a false positive. In other words, if this returns
|
|
|
|
|
+ * {@code true} then there <strong>are</strong> positions for which {@link #getValueCount}
|
|
|
|
|
+ * will return more than 1. This will answer quickly if it can but may have
|
|
|
|
|
+ * to check all positions.
|
|
|
|
|
+ */
|
|
|
|
|
+ boolean doesHaveMultivaluedFields();
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Creates a new block that only exposes the positions provided.
|
|
* Creates a new block that only exposes the positions provided.
|
|
|
* @param positions the positions to retain
|
|
* @param positions the positions to retain
|