You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2015/11/29 03:18:46 UTC
svn commit: r1717024 -
/poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
Author: onealj
Date: Sun Nov 29 02:18:45 2015
New Revision: 1717024
URL: http://svn.apache.org/viewvc?rev=1717024&view=rev
Log:
bug 58636: make ClientAnchor enum constructor private, make byId Internal
Modified:
poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java?rev=1717024&r1=1717023&r2=1717024&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java Sun Nov 29 02:18:45 2015
@@ -16,6 +16,8 @@
==================================================================== */
package org.apache.poi.ss.usermodel;
+import org.apache.poi.util.Internal;
+
/**
* A client anchor is attached to an excel worksheet. It anchors against a
* top-left and bottom-right cell.
@@ -120,10 +122,19 @@ public interface ClientAnchor {
DONT_MOVE_AND_RESIZE(3);
public final short value;
- AnchorType(int value) {
+
+ // disallow non-sequential enum instance creation
+ private AnchorType(int value) {
this.value = (short) value;
}
+ /**
+ * return the AnchorType corresponding to the code
+ *
+ * @param value the anchor type code
+ * @return the anchor type enum
+ */
+ @Internal
public static AnchorType byId(int value) {
return values()[value];
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org